http-headers

Visual Studio 2008 built-in web server needs integrated pipeline mode for Adding Http Header

Using Visual Studio 2008 and built-in web server. In a Web Handler .ashx file public void ProcessRequest(HttpContext context) { context.Response.ContentType = MimeType_text_xvcard; context.Response.Headers.Add(HttpHeader_ContentLength, "2138"); when I try to add an HTTP header I get the exception: This operat...

Not seeing Ajax requests in Firebug if header has been modified

Hey braintrust, I'm making an ajax call using jQuery's library to an api, which requires a username and password encoded to base64 be added to the header. here's a basic example: $.ajax({ type: "GET", contentType: 'application/json', beforeSend:function(xhr){ xhr.setRequestHeader("Authentication", "Basic " + ba...

Why would certain browsers request all pages on my ASP.Net Web site twice?

Firefox is issuing duplicate requests to my ASP.Net web site. It will request a page, get the response, then immediately issue the same request again (well, almost the same -- see below). This happens on every page of this particular Web site (but not any others). IE does not do this, but Chrome also does this. I have confirmed that the...

How to remove date header from apache ?

hi everyone, I need to minimize Apache HTTP response headers, by now i reduced them as following HTTP/1.1 200 OK Date: Thu, 25 Mar 2010 21:57:41 GMT Server: Apache Content-Type: text/html I'd like to know if there is a way to disable Date and Server header, only for a certain virtual host. Thank you! ...

Charset and POST request

Hi All! I have a Rails 2.3.5 application that is working fine with UTF-8 and international characters. Now I have made some integration to a payment gateway where I POST some data, wait a while and get a POST back. The problem is that when I get that post back the international characters are broken. Instead of "sørensen" I get: "søre...

Track results of a regular expression extractor in JMeter

Our server returns a custom 'X-Execution-Time' HTTP response header that returns in miliseconds the time between the server getting a request and our code returning a page, ie how long our code takes to run. I'm using JMeter to do some testing & I'd like to be able to report on this number of over time. I've setup this regular expressi...

Extract response header value in IIS logparser

I'm using IIS LogParser 2.2 & I want to get the value of a particular response header. Is there a function I can use in the query to extract the value of one http response header out of the responseHeader field? I'm currently doing this, which is really ugly: substr(ltrim(extract_suffix(responseHeader, 0, 'headername: ')), 0, index_of...

How to set access-control-allow-origin in webrick under rails?

I have written a small rails app to serve up content to another site via xmlhttprequests that will be operating from another domain (it will not be possible to get them running on the same server). I understand I will need to set access-control-allow-origin on my rails server to allow the requesting web page to access this material. It ...

Modifying HTTP response headers in Firefox

Hi, Does anyone know if Firefox extensions are allowed to modify HTTP response headers? For example, can an extension remove the x-frame-options header to let the page load in an iframe? Thanks ...

What is the HTTP_PROFILE browser header and how is it used?

I've just come across the HTTP_PROFILE header that seems to be used by mobile browsers to point to an .xml document describing the device's capabilities. Doing a Google search doesn't turn up any definitive resources on what this is and how it should be used, can anyone point me to something along the lines of a spec/W3C standard? ...

Cookie not renewing/overwriting in IE

I have a weird quirk with cookies in IE. When a user logs into the site, I'm generating a new session id and hence need to overwrite the cookie. The flow is basically: Client goes to https://secure.example.com/users/login page, automatically receiving a session id Client POSTs login credentials to same address Client receives the follo...

PHP: Does $_SERVER['HTTP_X_REQUESTED_WITH'] exist or not?

All over the Internet, included even here at StackOverlow, people state that a good way to check if a request is AJAX or not is to do the following: if (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) {...} However, I don't see $_SERVER['HTTP_X_REQUESTED_WITH'] in the official PHP documentation And when I try to d...

Requires a valid Date or x-amz-date header?

I'm getting the following error when attempting to upload a file to S3: S3StorageError: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>AWS authentication requires a valid Date or x-amz-date header</Message><RequestId>7910FF83F3FE17E2</RequestId><HostId>EjycXTgSwUkx19YNkpAoY2UDDur/0d5SMvGJUicpN6qCZFa2Ouqc...

How can I test my browser ignoring Location headers?

I want to test a site with my Firefox ignoring Location: headers like this example in PHP. header('Location: another-page.php'); Is there a plugin available to do this, or any other method? Would my best bet be surfing the site with Lynx? Does Lynx ignore them? Thanks ...

how to set httpheaders in asp.net mvc

I need to set http header for disabling ie (7-8) caching (it disturbs my ajax functionallity). I've tried inserting this code to the head of my site.master with no result - <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> How and where can I set the HTTP headers? or do you have a better solutio...

RFC2616 : Do I really need to set WWW_Authenticate when returning 401?

According to RFC2616 if I return 401 in response to a request to my (Ruby) server, I "MUST include a WWW-Authenticate header field." Is this really true? Not setting the header seems to have no negative impact. I'm using Merb as a web framework and it doesn't force me to set the header. Am I missing something or is this a rule more hono...

What is a header? Especially, what are POST@GET headers?

Hello, I've been trying to find a Python code that would log in to my Yahoo account from "Google App Engine". One supporter on "StackOverflow" gave me this three-step plan: Simulate normal login and save login page that you get; Save POST&GET headers with "Wireshark"; Compare login page with those headers and see what fields you need ...

How to specify HTTP expiration header? (ASP.NET MVC+IIS)

I am already using output caching in my ASP.NET MVC application. Page speed tells me to specify HTTP cache expiration for css and images in the response header. I know that the Response object contains some properties that control cache expiration. I know that these properties can be used to control HTTP caching for response that I am ...

PHP File Serving Script: Unreliable Downloads?

This post started as a question on ServerFault ( http://serverfault.com/questions/131156/user-receiving-partial-downloads ) but I determined that our php script was the culprit. So I'm issuing an updated question here about what I believe is the actual issue. I am using a php script to verify permissions and then serve up a file for use...

Asp.NET 1.1 HttpResponse headers

Hi, i have part of Asp.NET 1.1 project. I work with remote site, which works incorrect in some cases - sometimes it write incorrect Content-Encoding header. In my code i get HttpResponse from this remote site. And if Content-Encoding header is equals, for example, "gzip", i need to set Content-Encoding header to "deflate". But there i...