The complete guide to Go net/http timeouts

When writing an HTTP server or client in Go, timeouts are amongst the easiest and most subtle things to get wrong: there’s many to choose from, and a mistake can have no consequences for a long time, until the network glitches and the process hangs.

HTTP is a complex multi-stage protocol, so there's no one-size fits all solution to timeouts. Think about a streaming endpoint versus a JSON API versus a Comet endpoint. Indeed, the defaults are often not what you want.

In this post I’ll take apart the various stages you might need to apply a timeout to, and look at the different ways to do it, on both the Server and the Client side.

SetDeadline

First, you need to know about the network primitive that Go exposes to implement timeouts: Deadlines.

Exposed by net.Conn with the Set[Read|Write]Deadline(time.Time) methods, Deadlines are an absolute time which when reached makes all I/O operations fail with a timeout error.

Deadlines are not timeouts. Once set they stay in force forever (or until the next call to SetDeadline), no matter if and how the connection is used in the meantime. So to build a timeout with SetDeadline you'll have to Continue reading

Terrorism database of 2.2 million people leaked

Security researcher Chris Vickery has a knack for finding unprotected databases, but this time it’s an especially explosive discovery, as he came across a “terrorism blacklist” that contains the names of 2.2 million “heightened-risk individuals and organizations.”Vickery asked Reddit if he should share a copy of the Thomson Reuters World-Check database from mid-2014. He wrote, “This copy has over 2.2 million heightened-risk individuals and organizations in it. The terrorism category is only a small part of the database. Other categories consist of individuals suspected of being related to money laundering, organized crime, bribery, corruption, and other unsavory activities.”To read this article in full or to leave a comment, please click here

Terrorism database of 2.2 million people leaked

Security researcher Chris Vickery has a knack for finding unprotected databases, but this time it’s an especially explosive discovery, as he came across a “terrorism blacklist” that contains the names of 2.2 million “heightened-risk individuals and organizations.”Vickery asked Reddit if he should share a copy of the Thomson Reuters World-Check database from mid-2014. He wrote, “This copy has over 2.2 million heightened-risk individuals and organizations in it. The terrorism category is only a small part of the database. Other categories consist of individuals suspected of being related to money laundering, organized crime, bribery, corruption, and other unsavory activities.”To read this article in full or to leave a comment, please click here

Terrorism database of 2.2 million people leaked

Security researcher Chris Vickery has a knack for finding unprotected databases, but this time it’s an especially explosive discovery, as he came across a “terrorism blacklist” that contains the names of 2.2 million “heightened-risk individuals and organizations.”Vickery asked Reddit if he should share a copy of the Thomson Reuters World-Check database from mid-2014. He wrote, “This copy has over 2.2 million heightened-risk individuals and organizations in it. The terrorism category is only a small part of the database. Other categories consist of individuals suspected of being related to money laundering, organized crime, bribery, corruption, and other unsavory activities.”To read this article in full or to leave a comment, please click here

Terrorism database of 2.2 million people leaked, a blacklist used by governments, banks

Security researcher Chris Vickery has a knack for finding unprotected databases, but this time it’s an especially explosive discovery as he came across a “terrorism blacklist” which contains the names of 2.2 million “heightened-risk individuals and organizations.”Vickery asked Reddit if he should share a copy of the Thomson Reuters World-Check database from mid-2014. He wrote, “This copy has over 2.2 million heightened-risk individuals and organizations in it. The terrorism category is only a small part of the database. Other categories consist of individuals suspected of being related to money laundering, organized crime, bribery, corruption, and other unsavory activities.”To read this article in full or to leave a comment, please click here

Terrorism database of 2.2 million people leaked, a blacklist used by governments, banks

Security researcher Chris Vickery has a knack for finding unprotected databases, but this time it’s an especially explosive discovery as he came across a “terrorism blacklist” which contains the names of 2.2 million “heightened-risk individuals and organizations.”Vickery asked Reddit if he should share a copy of the Thomson Reuters World-Check database from mid-2014. He wrote, “This copy has over 2.2 million heightened-risk individuals and organizations in it. The terrorism category is only a small part of the database. Other categories consist of individuals suspected of being related to money laundering, organized crime, bribery, corruption, and other unsavory activities.”To read this article in full or to leave a comment, please click here

Installing Windows 10: What to do when there’s not enough storage space

By now, most people who want Windows 10 on their PCs (and some who don’t) have probably installed the upgrade by now.But there is at least one notable exception: If you don’t have enough free storage space on your hard drive, the installation won’t complete. This may result in a “Windows needs more space” dialog box, or one of several error codes (including 0x80070070 – 0x50011, 0x80070070 – 0x50012, or 0x80070070 – 0x60000).INSIDER Review: Enterprise guide to Windows 10 Time’s running out to clear some space and complete the installation. Here’s what you can do to make sure the upgrade goes through:To read this article in full or to leave a comment, please click here

NFC-enabled ATMs make it easy to withdraw cash with a smartphone

Android Pay and Apple Pay may be picking up momentum, but cash is still relevant. So what do you do if you’re living a wallet-free life, but need to grab some paper money from the ATM? This is where NFC comes in handy. The same mobile-payments chip that you use with your smartphone at the checkout stand can be used at the ATM, too. Bank of America is one of the first major banks to deploy NFC-enabled ATMs. The company currently offers some 2,800 terminals around the U.S., with 5,200 more coming by year’s end. The nice thing about NFC is that no arduous setup is required. All you need is an Android Pay or Apple Pay profile with your debit card already activated. To read this article in full or to leave a comment, please click here

Microsoft’s big Windows 10 update launches on August 2

Microsoft's latest major refresh of Windows 10 will be released publicly on August 2, the company confirmed Wednesday morning. In a blog post, Microsoft outlined the full list of new features coming with the update, including security upgrades, improvements to Cortana and features aimed at making touchscreen devices with Windows 10 more useful. The news comes almost a year after the consumer launch of Windows 10, which has been one of the company’s major turning points under the leadership of CEO Satya Nadella. The operating system has seen massive (if, at times, unintentional) adoption by both business and consumer users in that time, and these upgrades may further spur adoption across those markets as well.To read this article in full or to leave a comment, please click here

Dangerous keyboard app has more than 50 million downloads

The Flash Keyboard app has been downloaded more than 50 million times -- but is capable of some extremely dangerous behaviors."It looked like it was a convenient keyboard that had some nice features," said Bill Anderson, chief product officer at mobile security company OptioLabs. "The marketing copy in the app store looked great."For a while, the app was in the top 20 downloads for the Google Play Store, he added.MORE ON NETWORK WORLD: 6 simple tricks for protecting your passwords "The problem was that it asked for just about every permission that an app could ask for," he said. "It was an especially long list. And surprisingly, most people said yes. But the permissions were so excessive that it turned this thing into a potentially marvelous way to hack phones."To read this article in full or to leave a comment, please click here

Dangerous keyboard app has more than 50 million downloads

The Flash Keyboard app has been downloaded more than 50 million times -- but is capable of some extremely dangerous behaviors."It looked like it was a convenient keyboard that had some nice features," said Bill Anderson, chief product officer at mobile security company OptioLabs. "The marketing copy in the app store looked great."For a while, the app was in the top 20 downloads for the Google Play Store, he added.MORE ON NETWORK WORLD: 6 simple tricks for protecting your passwords "The problem was that it asked for just about every permission that an app could ask for," he said. "It was an especially long list. And surprisingly, most people said yes. But the permissions were so excessive that it turned this thing into a potentially marvelous way to hack phones."To read this article in full or to leave a comment, please click here

When tech and fashion collide

How technology is transforming the fashion industryThe ideas flowing through designers’ minds are difficult to capture. Transforming precisely what they think and draw into tangible pieces of work can be laborious and time consuming. And the artists can become frustrated when what they produce doesn’t come out exactly as they imagine it.Technology has eliminated that struggle for many designers. Through the use of multi-material 3D printers, laser cutters and digital printers that print on material, designers are creating fashions exactly as they see them in their mind’s eye. Plus, the new tools enable them to create intricate designs that are impossible to make by hand.To read this article in full or to leave a comment, please click here

Why one Cisco shop is willing to give WiFi startup Mist a shot

Bowdoin College’s WiFi network encompasses 550 Cisco access points and handles the wireless needs of up to several thousand people depending on how busy things are on the Brunswick, Maine campus. But CIO Mitchel Davis says this WLAN still has plenty of room to grow.The college over the past couple of weeks has been testing new WiFi and Bluetooth Low Energy access points and accompanying cloud-based management tools from a Mountain View startup called Mist, formed by ex-Cisco WLAN big shots, as a possible way to expand its wireless services in exciting new ways.To read this article in full or to leave a comment, please click here

This malware pretends to be WhatsApp, Uber and Google Play

Hackers are stealing credit card information in Europe with malware that can spoof the user interfaces of Uber, WhatsApp and Google Play.The malware, which has struck Android users in Denmark, Italy and Germany, has been spreading through a phishing campaign over SMS (short message service), security vendor FireEye said on Tuesday.Once downloaded, the malware will create fake user interfaces on the phone as an “overlay” on top of real apps. These interfaces ask for credit card information and then send the entered data to the hacker.To read this article in full or to leave a comment, please click here

This malware pretends to be WhatsApp, Uber and Google Play

Hackers are stealing credit card information in Europe with malware that can spoof the user interfaces of Uber, WhatsApp and Google Play.The malware, which has struck Android users in Denmark, Italy and Germany, has been spreading through a phishing campaign over SMS (short message service), security vendor FireEye said on Tuesday.Once downloaded, the malware will create fake user interfaces on the phone as an “overlay” on top of real apps. These interfaces ask for credit card information and then send the entered data to the hacker.To read this article in full or to leave a comment, please click here