http-headers

What does this kind of http header mean in symfony?

$this->getResponse()->addCacheControlHttpHeader('private=True'); What's that for,how does it work? ...

How to create an IE8 add-on that adds an X-Forwarded-For header

I have several users coming from different places into a terminal server and browsing my site from the server. The problem is that i need to log what ip-address the user is actually coming from, not the ip for terminal server. I have full control over the terminal-server so I was thinking that some sort of add-on to IE8 on the server cou...

In ISAPI, is it possible to set a header to a "the empty string" ?

The documentation for the ISAPI SetHeader function says that using '\0' for the value of the header will delete the header. Q1. Is it possible for an ISAPI filter to set the value of a header to the empty string? How? Q2. Does it even make sense to want to do this? Is it legal in the HTTP protocol to have an empty request header?...

To display Headerview with image and labels in the viewcontroller

I am new to iphone development i have created one view controller and i used grouped table view. Now i want to display the header view in my viewcontroller with image and labels. please guide me and help me out in this problem. Thanks. ...

Can you set http headers when using HttpRequest object in Silverlight?

I'm having trouble setting any HTTP header values when making a HttpRequest from Silverlight 3.0? Are HTTP Headers supported in Silverlight 3.0? The following code throws an exception when the request callback is called: var url = new Uri("http://lonmw32795/RBSM_Portal_RESTfulWebService/HostInterrogationService.svc/host/enviro...

Creating an HTTP POST Request with Header info using Net::HTTP in Ruby

Hi Im trying to programmatically post to an html form on the internet.I have managed to create a request with parameters in the request body but I can't figure out how to pass in Http Header attributes using the Net::Http library. Any ideas if this is possible?... Any other library that would do it for me ? res = Net::HTTP.post_form(UR...

Java response content returns instead of < or > &lt; &gt;

Hi. I have a little problem: I'm writing to response content of the file and return it to the client as an ajax response. But there occurs html substitution: of > to &gt; etc... What i have to do to make this substitution off ? res.setHeader( "Cache-Control", "must-revalidate, post-check=0, pre-check=0" ); res.setHeader( "Pragma", "publ...

How to detect the site a user came from before mine in PHP?

How can I detect the site the user came from before accessing mine in PHP? ...

System.Net.WebClient request gets 403 Forbidden but browsers do not with Apache servers

An odd one, I'm trying to read the <Head> section of a lot of different websites out there, and one particular type of server, Apache, sometimes gives the code 403 forbidden. Not all apache servers do this, so it may be a config setting or a particular version of the server. When I then check the url with a web browser (Firefox, for exa...

Hiding PHP's X-Powered-By header

Hi I know in PHP, it sends the X-Powered-By header to have the PHP version. I also know by appending some checksums, you can get access to PHP's credits, and some random images (more info here). I also know in php.ini you can turn expose_php = off. But here is something I have done on a few sites, and that is use header('X-Powered-B...

Vary: Accept-Encoding always set to *

Hi Guys, I am trying to set the "Vary:Accept-Encoding" header using ASP.NET MVC and the HttpCompress from blowery. The problem I keep running into is that the header sets to Vary: * instead of Vary:Accept-Encoding Would anyone be able to assist in what would be causing this? ...

Set "Last-Modified" Header to "Date-Modified" of File in ASP.NET MVC ?

Hi Guys, I am trying to figure out in ASP.NET MVC how to optimize getting the "Date modified" to use in the last-modified header in ASP.NET MVC. I dont want to check the date of each request as this seems loss of performance. Basically, at the moment I am using "Release Date" for date-modified, but the problem here is that everytime ...

Are there any guidelines to what should NOT go into HTTP headers?

I'm working on an API that sends HTML forms to external AJAX apps. Would it be abusing the HTTP headers if I include information such as stylesheets and scripts to use in the headers? I'd like to keep the HTML as clean as possible. ...

Python socket data returns <byte> object. How to regexp it?

I'm writing a basic html-proxy in python (3), and up to now I'm not using prebuild classes like http.server. I'm just starting a socket which accepts connection: self.listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.listen_socket.bind((socket.gethostname(), 4321)) self.listen_socket.listen(5) (a, b) = self.listen_...

Custom webserver caching

I'm working with a custom webserver on an embedded system and having some problems correctly setting my HTTP Headers for caching. Our webserver is generating all dynamic content as XML and we're using semi-static XSL files to display it with some dynamic JSON requests thrown in for good measure along with semi-static images. I say "semi...

List of available “application/…” media types

Anyone know the list of available application/… media types? It is because my website will be having different types of downable documents such as doc, docx, txt, pdf etc. I need to know the available application/… for the HTTP header. ...

IIS removes If-None-Match and If-Modified-Since headers

I have an ASHX handler or an ASPX page (the problem happens in both cases). The web client sends a request containing If-None-Match and/or If-Modified-Since headers but context.Request.Headers.Get("If-None-Match") or context.Request.Headers.Get("If-Modified-Since") is null in the handler. The same script works in my local development ...

Set form submit header

Is there any way to set the HTTP header fields of a HTML form submit request? I need to make an authenticated request to a URL, so i need to set a header field. I can't use ajax because of cross-domain restrictions. ...

JSON.parse fails in jQuery when PHP response-header contains "application/json"

Hi there, I'm getting a bit of a headache trying to figure this one out. To request some json-data from a PHP-script via Ajax, I'm using the jQuery function: $.ajax({ type: 'GET', cache: 'false', url: ajaxUrl, data: dataString, success: updatePage }); If I don't set content-type in the PHP header to: header('Conte...

What could cause headers to already be sent, and how would I track it down?

First off, I'm by no means new to PHP, or sending headers. However, I'm getting the following error: Warning: Cannot modify header information - headers already sent in /var/www/oraviewer/download/scripts/start.inc on line 30 Warning: Cannot modify header information - headers already sent by (output started at /var/www/oraviewer/down...