What are all the possible values for HTTP “Content-Type” header?

You can find every content type here: http://www.iana.org/assignments/media-types/media-types.xhtml The most common type are: Type applicationapplication/java-archive application/EDI-X12 application/EDIFACT application/javascript application/octet-stream application/ogg application/pdf application/xhtml+xml application/x-shockwave-flash application/json application/ld+json application/xml application/zip application/x-www-form-urlencoded Type audioaudio/mpeg audio/x-ms-wma audio/vnd.rn-realaudio audio/x-wav Type imageimage/gif image/jpeg image/png image/tiff image/vnd.microsoft.icon image/x-icon image/vnd.djvu image/svg+xml Type multipartmultipart/mixed multipart/alternative multipart/related (using by MHTML (HTML mail).) multipart/form-data Type texttext/css text/csv text/html … Read more

How to download HTTP directory with all files and sub-directories as they appear on the online files/folders list?

Solution: Explanation: It will download all files and subfolders in ddd directory -r : recursively -np : not going to upper directories, like ccc/… -nH : not saving files to hostname folder –cut-dirs=3 : but saving it to ddd by omitting first 3 folders aaa, bbb, ccc -R index.html : excluding index.html files Reference: http://bmwieczorek.wordpress.com/2008/10/01/wget-recursively-download-all-files-from-certain-directory-listed-by-apache/

How to handle ETIMEDOUT error?

This is caused when your request response is not received in given time(by timeout request module option). Basically to catch that error first, you need to register a handler on error, so the unhandled error won’t be thrown anymore: out.on(‘error’, function (err) { /* handle errors here */ }). Some more explanation here. In the handler you can check if … Read more

Access-Control-Allow-Origin Multiple Origin Domains?

Sounds like the recommended way to do it is to have your server read the Origin header from the client, compare that to the list of domains you would like to allow, and if it matches, echo the value of the Origin header back to the client as the Access-Control-Allow-Origin header in the response. With .htaccess you can do it like … Read more

Custom Tumblr theme wont save because of non-https urls?

Just had the same problem. Tumblr updated their Encryption policies. If you’re a theme developer and you’d like to ensure your themes support HTTPS, make sure that any externally hosted resources, such as Cascading Style Sheets (CSS) or Javascript files, and even images, are served using HTTPS. As we now know that Tumblr requires that we … Read more