http-headers

IE6 and Caching

It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on. Is there a specific HTTP Header that IE6 does listen too? ...

Making sure a web page is not cached, across all browsers.

Our investigations have shown us that not all browsers respect the http cache directives in a uniform manner. For security reasons we do not want certain pages in our application to cached, ever, by the web browser. This must work for at least the following browsers: Internet Explorer versions 6-8 FireFox versions 1.5 - 3.0 Safari ver...

How to set an HTTP header while using a Flex RemoteObject method ?

I am running blazeds on the server side. I would like to filter http requests using an http header. My goal is to send extra parameters to the server without changing the signatures of my blazeds services. On the client side, I am using Flex RemoteObject methods. With Flex WebService components, it is possible to set an http header us...

How to encode the filename parameter of Content-Disposition header in HTTP?

Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form: Content-Disposition: attachment; filename=FILENAME The filename parameter can be used to suggest a name for the file into which the resource is downloaded by...

Specific Client Detection based on headers. Firefox extension?

I have a website in which I want to be able to detect a certain user based upon a permanent attribute of a specific user. My original plan was to use an ip address but those are difficult to maintain since they can change frequently. Cookie's and Sessions are almost out of question because they expire and tend to be difficult to manipul...

How do you send a HEAD HTTP request in Python?

So what I'm trying to do here is get the headers of a given URL so I can determine the mime-type. I want to be able to see if http://somedomain/foo/ will return an html document or a jpg image for example. Thus, I need to figure out how to send a HEAD request so that I can read the mime-type without having to download the content. Does a...

Client-side detection of HTTP request method

Is it possible to detect the HTTP request method (e.g. GET or POST) of a page from JavaScript? If so, how? ...

C# Get http:/.../File Size

I want to get the size of an http:/.../file before I download it. The file can be a webpage, image, or a media file. Can this be done with HTTP headers? How do I download just the file HTTP header? Thanks! ...

HttpHeaders in ASP.NET 1.1

How do I read the Response Headers that are being sent down in a page ? I want to be able to read the header values and modify some of them. This is for an ASP.NET 1.1 application but I would be curious to know if it can done in any version of ASP.NET. The reason for doing this is someone may have added custom headers of their own befor...

How do I find the mime-type of a file with php?

Ok, so I have an index.php file which has to process many different file types. how do I guess the filetype based on the REQUEST_URI. If I request http://site/image.jpg, and all requests redirect through index.php, which looks like this <?php include('/www/site'.$_SERVER['REQUEST_URI']); ?> How would I make that work correctly? ...

How can I perform a HEAD request with the mechanize library?

I know how to do a HEAD request with httplib, but I have to use mechanize for this site. Essentially, what I need to do is grab a value from the header (filename) without actually downloading the file. Any suggestions how I could accomplish this? ...

How do I know WHEN to close an HTTP 1.1 Keep-Alive Connection?

I am writing a web server in Java and I want it to support HTTP 1.1 Keep-Alive connections. But how can I tell when the client is done sending requests for a given connection? (like a double end-of-line or something). Lets see how stackoverflow handles this very obscure question -- answers for which, on Google, are mired in technical s...

File name corruption on file download (IE)

I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers: HTTP/1.1 200 OK Date: Tue, 30 Sep 2008 14:00:39 GMT Server: Microsoft-IIS/6.0 Content-Disposition: attachment; filename=filename.doc; Content-Type: application/octet-stream Content-Length: 10754 I...

Set up an HTTP proxy to insert a header

I need to test some HTTP interaction with a client I'd rather not modify. What I need to test is the behavior of the server when the client's requests include a certain, static header. I'm thinking the easiest way to run this test is to set up an HTTP proxy that inserts the header on every request. What would be the simplest way to set ...

Possible to detect the *type of mobile device* via javascript or HTTP Headers?

I've got a request from a customer to automatically detect the type of mobile device (not the browser, the type. ex: Moto Q, Blackjack II, etc.) and automatically select the device from a drop down with a list of supported devices. So far I've found that the HTTP Headers (submitted by mobile IE) contain information such as Resolution ...

Why do I get "Cannot redirect after HTTP headers have been sent" when I call Response.Redirect(url)?

When I call Response.Redirect(someUrl) I get an HttpException: "Cannot redirect after HTTP headers have been sent". ...

Why is Apache + Rails is spitting out two status headers for code 500?

I have a rails app that is working fine except for one thing. When I request something that doesn't exist (i.e. /not_a_controller_or_file.txt) and rails throws a "No Route matches..." exception, the response is this (blank line intentional): HTTP/1.1 200 OK Date: Thu, 02 Oct 2008 10:28:02 GMT Content-Type: text/html Content-Length: 122...

Where can I find a List of Standard HTTP Header Values?

I'm looking for all the current standard header values a web server would generally receive. An example would be things like "what will the header look like when coming from a Mac running OS X Leopard and Camino installed?" or "what will the header look like when coming from Fedora 9 running Firefox 3.0.1 versus SuSe running Konqueror?"...

PHP - Custom error handling. Redirected 404 is being hijacked by AVG Anti-Virus. How to stop?

I have a website which uses the custom 404 error handling in PHP/Apache to display specific pages. e.g. http://metachat.org/recent I've a feeling this is a bad way of doing this, but it's code I inherited... Although the page displays correctly on most browsers, I'm getting a situation where AVG Anti-Virus is hijacking the page and re...

A way to prevent a mobile browser from downloading and displaying images

Hey, Is there a simple way to prevent browser from downloading and displaying images, best would be via some magic style tag or javasctipe. The thing is, I'd like to tweak the company's website a bit to be more usable via mobile devices. The company is a gaming one, there's like 5MBs of images on it's main page (and those can't be touc...