http-headers

how to set custom http header

hi, I want to set the emulateIE7 tag on per site basis. For that i'l need to set the same tag in http header. I am using jboss. So can anyone please tell me how to add custom http header in jboss.. ...

How to store header info in a custom WCF HTTP binding

Hi there, Basically, I want to get HTTP requests from a different source than a listening socket. However, since the provided bindings don't offer support for this, I am currently building my own binding. My current binding consists of the WebMessageEncoder and of a custom TransportBindingElement, which references a custom ChannelListe...

file download with php (working on apache under localhost)

Hi all I'm trying to create a file download page. This page when requested should prompt the user to download a file. Here is the source code for the page: <?php header('Content-disposition: attachment; filename=zip.zip') header('Content-type: application/zip'); readfile('zip.zip'); ?> This works ok. The problems starts when I wa...

Why doesn't apache show a 404 error when I send a 404 header with php?

Hello, I have a header('HTTP/1.0 404 Not Found'); somewhere along the code but it doesn't redirect to the Apache's default 404 page for some reason. I have a Rewrite Rule on the .htaccess file that redirects every request to index.php. Could that be the problem? Thanks in advance, Omer. ...

Partial Get request using NSURLMutableRequest

I am having trouble trying to do a partial get request using NSURLMutableRequest. I set up the header values as follows: NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url]; NSString* range = [NSString stringWithFormat:@"bytes %d-%d/%d", receivedContentLength, expectedContentLength, expectedContentLength]; [request ...

How to get Google cookies having the user and the password?

The tool I'm developing would do a thing similar to when you join Facebook and they ask your GMail username and password and with it they can grab all your contacts. But my tool doesn't use a browser, therefore it is difficult to get the proper headers. I assume that the Google application (Orkut) checks only my Cookies and Identity(ip,...

how can I get the file version on the Internet but not download it ?

I get a file url,for example, http://cidian.youdao.com/download/YoudaoDict.exe how can I get it's version but not download it ? nots 1: if you download the file first on your computer,there are many ways to get it's version, for example ,you can use the window tools "filever.exe" to get the version. but i want to not download it ,at...

Ajax login script header problem

Hi, I have a ajax login script, using prototype, where I ajax the credentials over to a php page that checks if the info is correct. If it is, I try to set a cookie and then return 0 or 1 depending if it is correct. The ajax call returns 0 if it is correct and then makes a js call on the original page to redirect into the site. I keep g...

Recover HttpHeader on Flex

Is it possible to recover the HttpHeader information from a flex Client? I want to do the following: User download the flex client from a web site In each communication flex client catch the HttpHeader information in order to change (If it is necessary) the host information to be connected (For example in a HA configuration) Thanks ...

How can I stop my ASP.NET webservice from returning xml data?

Hi folks, I've got a simple ASP.NET webservice. I'm wanting to return a string of json as the result. By default, my webservice is wrapping my json result in some xml. eg. <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://webservice.streetadvisor.com/"&gt;{.... json result in here ... }</string> Booo. Is there any way i...

Why does ASP.NET framework add the 'X-Powered-By:ASP.NET' HTTP Header in responses?

I am just curious to know if there is a specific reason why the .Net Framework adds the 'X-Powered-By:ASP.NET' Http Header in its responses? Do other web servers (Apache, httpd) do the same thing? EDIT: I know that it can be changed. I want to know if there is a reason to keep it or leave it as it is? ...

Using custom response headers to help detect site transfers

This is more of a best practice question. At our company we often have the requirement to transfer a website from one server to another. DNS takes a while to update so it's often nice to be able to tell when a site has transferred to the new server, even if there are no changes to the actual website itself. My thought was to set a resp...

ASP.NET-MVC Header-Fields and Error Correction

2 part question: 1. How does ASP.NET MVC deal / store || ignore malformed headers?? - e.g. if a proxy or security app tweaking: Accept-Encoding: gzip,deflate to be -> X-cept-EncodXng: gzip,deflate As when this happens, I am currently unable to respond optimally – which leads to part 2: 2. Are there any stand...

HTTP HEAD response - set Content-Length

I'm trying to build a HEAD method to one of our services so that clients can peek at the content type and size before deciding whether to download it. How can I set the Content Length of the response header? Using HttpContext exposes the ContentType, Encoding etc but I can't specify a length as I presume this value is normally added by...

How do I add an HTTP header to a web service call?

I'm calling a web service from a console app - all in C# on .NET. I want to add an HTTP header (not a SOAP header) to the web service call. How do I do this? This is what my code looks like so far: EatService es = new EatService(); // web service added in Web References // Add HTTP header X-Info = "extra info" here string info = es.Ge...

Is there a HTTP header field / hack to tell the browser NOT to pipeline its requests ?

I am implementing a minimalistic web server application on a Microcontroller. When I have several images (or CSS/JS) on the web page, the browser creates several connections and fetches them. But the Microcontroller can not catch up with this. Is there a way to tell the browser to stop pipelining and fetch them one by one ? Note :: "Con...

Tomcat: Caching SWF files with varying query strings

I'm current loading my SWF from a JSP, and passing parameters to it via query string (e.g. flash.swf?key=1234abcd) which works fine. The problem is that this appears to disable caching completely. My users will likely visit my Flash app with a different query string every time, which will lead to long load times. I see in the headers th...

In HTTP, Prompt to Save and XML File Rather Then Render

In a Web Application I am creating, users can backup their data locally. The backup data is an XML file. At the moment, most browsers try to display this file. What should I change in the HTTP response to suggest to a user-agent that the file should instead be saved? ...

What meta tag can I place inside my html file so that it opens that page in microsoft word automatically?

My question is related to this one: http://stackoverflow.com/questions/326941/is-there-a-way-to-generate-word-documents-dynamically-without-having-word-on-the My co-worker told me however that there are some meta tags you can place inside your html head section that will redirect the html and make word open that html page as a word doc...

How can I tell if two image files are the same in Perl?

I have a Perl script I wrote for my own personal use that fetches image files from a website periodically. It then saves these images to a folder. These image files are quite often the same from fetch to fetch, and I'd like to not save duplicates if I can get around it. My question: What would be the best way to compare/check if they ...