What is the use of If-Unmodified-Since HTTP Header?

You can use it e.g. for a range request. example: your client requests the resource http://examp.le/foo?id=3 and the Contents-length is 4096 but your client only requests the first 1024 bytes. It can then (at a later time) request the remaining 3072 bytes but that doesn’t make sense if the resource has changed meanwhile. edit: Also … Read more

How to make an HTTP request from SSIS?

You can make use of the namespace System.Net.WebClient to make the Http request with the help of Script Task in SSIS. Following example shows how this can be achieved. The example was created in SSIS 2008 R2. Step-by-step process: Create a new SSIS package and create two variables namely RemoteUri and LocalFolder. Set the variable … Read more

How to read client IP addresses from HTTP requests behind Kubernetes services?

As of 1.5, if you are running in GCE (by extension GKE) or AWS, you simply need to add an annotation to your Service to make HTTP source preservation work. … kind: Service metadata: annotations: service.beta.kubernetes.io/external-traffic: OnlyLocal … It basically exposes the service directly via nodeports instead of providing a proxy–by exposing a health probe … Read more

HTTP/HTTPS basic authentication: colon in username

the RFC https://www.rfc-editor.org/rfc/rfc2617#section-2 states clearly that the username must not include a colon: To receive authorization, the client sends the userid and password, separated by a single colon (“:”) character, within a base64 [7] encoded string in the credentials.` basic-credentials = base64-user-pass base64-user-pass = <base64 [4] encoding of user-pass, except not limited to 76 char/line> … Read more

Which HTTP errors should never trigger an automatic retry?

There are some errors that should not be retried because they seem permanent: 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 409 Conflict – it depends 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large  414 URI Too Long … Read more

Policy for polling RSS feeds?

Make use of HTTP cache. Send Etag and LastModified headers. Recognize 304 Not modified response. This way you can save a lot of bandwidth. Additionally some scripts recognize the LastModified header and return only partial contents (ie. only the two or three newest items instead of all 30 or so). Don’t poll RSS from services … Read more

Is HTTP/1.0 still in use?

As of 2016, you would think that the prominence would decline even more since 1.1 was introduced in 1999 so this is about 17 years. I checked 7,727,198 lines of logs to see what percent I get of HTTP/1.0 and HTTP/1.1: Protocol Counts Percent ——————————– HTTP/0.9 0 0.00% HTTP/1.0 1,636,187 21.17% (all) HTTP/1.0 15,415 0.20% … Read more

multiple response.WriteHeader calls in really simple example?

Take a look at the anonymous function you register as the handler of incoming requests: func(w http.ResponseWriter, r *http.Request) { fmt.Println(r.URL) go HandleIndex(w, r) } It prints the URL (to the standard output) then calls HandleIndex() in a new goroutine and continues execution. If you have a handler function where you do not set the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)