http-headers

Multiple Set-cookie headers in HTTP.

I'm writing a small class that acts as a very basic HTTP client. As part of a project I'm working on, I'm making it cookie aware. However, it's unclear to me what happens when my client receives multiple "Set-Cookie" headers with the same key but different values are set. For example, Set-Cookie: PHPSESSID=abc; path=/ Set-Cookie: PHP...

Why is the default cache expires header Thu, 01 Dec 1994 16:00:00 GMT? What is the significance of this date?

When some requests are processed via WebSphere application server, it sets a cache expires header of Thu, 01 Dec 1994 16:00:00 GMT. This date seems to be in a lot of documentation as a example of a properly formed date for an expires header...but it is also all over the internet in regards to actual responses. Where does this exact date ...

Flask/Werkzeug how to attach HTTP content-length header to file download

Hi, I am using Flask (based on Werkzeug) which uses Python. So the user can download a file, I'm using the send_from_directory function: http://flask.pocoo.org/docs/api/?highlight=send_from_directory#flask.send_from_directory However when actually downloading the file, the HTTP header content-length is not set. So the user has no idea...

difference between REMOTE_HOST and REMOTE_ADDR

what is the difference between these two variables? REMOTE_HOST and REMOTE_ADDR ...

How to set the Expect header in Silverlight 4.0 to ignore HTTP status code 100

I want the Silverlight 4.0 client to ignore '100-continue' response code from a RESTful resource service, to do this i need to be able to set the Expect header - ' Expect: 100-continue' is this possible with the HttpWebRequest class? All the normal ways of doing this are not supported in Silverlight 4.0. ...

PHP download method hanging up page... best practices for pushing a download?

Hi there, quick question: I've got a form that forces a user to enter an email, after which a download/attachment is pushed and a file is downloaded... the file downloads fine... however... My problem is that when the download starts, the page locks up, and the user can't navigate anywhere or do anything on the page until the file is do...

What should my expires, cache-control, and pragma HTTP request header fields be set to?

I have a website in which I update the content approximately once monthly. When I check the HTTP request header fields, I get the following output: Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache My question is, given the frequency at which I u...

How to code my HTTP response header for 8 hours in the future in php/

I know how to set a basic expires HTTP response header in PHP as follows... header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); However, I want to make it a little more dynamic in that I want to, using PHP, specify an expiration time eight hours ahead of when the user accesses the content. Could someone help me achieve this? Thanks in...

Can I override/null out an HTTP response header field with a php script so that the field is not set?

If the server is automatically sending an Expires HTTP header response by default, can I override/null that out with a php script so that the Expires header field is not set? ...

What should my Pragma HTTP response header be set to?

I have my cache related headers set to expire at eight hours as follows... header('Cache-Control: max-age=28800'); header('Expires:' . gmdate('D, d M Y H:i:s T', strtotime('+8 hours'))); With that being the case, what should my Pragma HTTP response header be set to? ...

Reading HTTP headers from JAX-WS Web Service

Hi all, I currently have a JAX-WS Web Service that receives some credentials in the HTTP header. These are used for BASIC authentication. There is a filter that performs authentication by reading the HTTP headers and checking against the database. Still, I need the username from within the Web Service in order to perform other servic...

flex HTTP Basic authentication problem

hello, i'm trying to get xml file that requires HTTP Basic authentication : private function authAndSend(service:HTTPService):void { var enc:Base64Encoder = new Base64Encoder(); enc.insertNewLines=false; enc.encode("login:pass"); service.headers["Authorizatio...

Pass request information from Servlet Filter to Web Service

I need to retrieve some information sent in the HTTP headers from within a Web Service. How can I achieve this? ...

How to detect from web application that client uses http proxy - why XFF header is missing?

I try to discover, from the web application, whether client uses transparent proxy. It should be simple in theory: just check for existence of XFF (x-forwarder-for) header. But for some unknown reasons this doesn't work at all. I work in the office which is connected to internet via corporate transparent proxy. If I go to any "ip-proxy-...

php header redirect not working

Hi all, I'm using an ajax call to trigger a php redirect using headers. According to chrome's developer tools the content of the page is loaded (ie: is in the resource list), but the page never redirects. I'm not getting any error codes. Here's the php: <?php ini_set('display_errors', false); if (!isset($_SESSION)) { if($_POS...

HTTP Headers: What is the difference between X-FORWARDED-FOR, X_FORWARDED_FOR, and HTTP_X_FORWARDED_FOR,

I see various spellings of the non-RFC "XFF" HTTP header used for identifying the IP addresses the request has been forwarded through. Is there a difference between these different header names: X-FORWARDED-FOR, X_FORWARDED_FOR, and HTTP_X_FORWARDED_FOR? Do I need to look for all three? PS - Yes, I know this header can be easily spoofed...

How useful is the X-Frame-Options header in protecting against malicious framing?

Adding the X-Frame-Options DENY to the response header helps protect against malicious framing of the web page and as a solution it's certainly better that client-side JavaScript solutions. But just how useful is it? Is is supported by all (modern) browsers and can it be bypassed by hackers intent on hijacking your site? ...

How to detect whether web page content is different from cached version

Hi guys As you know checking process of web pages content is a little different from static pages or personal files on our machines because content of Dynamic web pages are changed on each request. So if we are going to use checksums to identifying changes, We'll fail! very simple example is when site owner are use Google Ads on him webs...

How to get the status header for a website programmatically

Hi All, I am writing a win32 service in Delphi (should be able to translate any other code if you don't know delphi) that needs to fetch the status of a website. I know how to do this in .NET but am not sure with normal windows based programming. So, I need to query a website and return the Status Code 200, 301 ect. My plan is then to p...

Get header values in ASP.NET MVC

Hi All, I have a requirement to capture the HTTP User Agent header coming in from a device, take the value and remove a 'uuid' This UUID can then be used to direct the device to the correct location to give it the files relevant to the device. In webforms I was able to get it using Request.ServerVariables["HTTP_USER_AGENT"]; //inside...