http-headers

Socket.Accept() causes a one second TCP/IP connect

When using CasiniDev fiddler shows a one second TCP-Connect for each connection from a browser. it's always exactly one second maybe few milliseconds up or down, that's why I think it might be a configuration somewhere. the thing that I can't make any sense out of is when I use System.Net.WebClient.DownloadString() in a loop without fi...

Spring-WS : specifying the Content-Type

Hello ! I have a Spring Webservice based on AbstractJDomPayloadEndpoint. This service works fine, except that my client needs the HTTP header Content-Type to be set to the right charset (utf-8 in my case). I cant find where I can configure that. I tried writing a simple servlet Filter : chain.doFilter(request, response); HttpServletRe...

PHP headers already sent problem

Hello there when i go to the site it says Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /home/content/49/5712349/html/c/admin/admin.php:17) in /home/content/49/5712349/html/c/admin/admin.php on line 39 Warning: Cannot modify header information - hea...

Could HTTP Headers be bound to REST WCF service arguments?

I have a WCF REST Service: [ServiceContract] public IService { [WebGet] [OperationContract] Data GetData(UserInfo userInfo); } UserInfo is a class: public class UserInfo { public string UserName { get; set; } public string Password { get; set; } } I want UserName and Password properties be filled from specific H...

Return 404 if non existant page # PHP

I have a dynamic review system in place that displays 30 reviews per page, and upon reaching 30 reviews it is paginated. So I have pages such as /reviews/city/Boston/ /reviews/city/Boston/Page/2/ /reviews/city/Boston/Page/3/ and so on and so forth Unfortunately, Google seems to be indexing pages through what seems l...

php headers_sent function is not working

<h1>Header</h1> <?php echo 'teste'; // output here echo headers_sent(); // no output here! ?> Why headers_sent() doesn't output in this case? Thank you. ...

ColdFusion - how to set Content-Length header

Has anyone successfully added a Content-Length header to regular ColdFusion (I'm using CF9) pages? I'm setting up a new server behind a Cisco load balancer with compression - the box refuses to compress anything without this header, but CF doesn't pass it by default. <cfheader name="Content-Length" value="something" /> will set the head...

HTTP monitoring for PHP file_get_contents

Is there any tools like httpwatch/fiddler available to monitor the headers send by PHP API like file_get_contents ...

how to create .ASPXAUTH cookie on python

hi; i need to create .ASPXAUTH cookie on python. i programing to desktop client. and first request not need .ASPXAUTH cookie but second request is need. My First Request Headers: User-Agent: WebPolicy Host: xxx.host Cache-Control: no-cache My First Response Headers: reply: 'HTTP/1.1 200 OK\r\n' header: Cache-Control: private hea...

encoding mobile-device versioning for REST Api server

We have restful api over HTTP. Amongst other clients we have also mobile-device clients (e.g. iphone). The issue is that there are several iphone apps in different versions out there (1.0, 2.0). Because they are distributed we don't have control which app-version is calling us. To identify the app-version on server-side I see following...

How to prevent App Engine from merging multiple headers with the same name?

App Engine seems to always merge multiple headers with the same name into one. For example if one sets this in CGI print "Set-Cookie: foo=bar" print "Set-Cookie: spam=egg" What is actually delivered to the browser is Set-Cookie: foo=bar, spam=egg which is of course wrong. The correct solution is either Set-Cookie: foo=bar; spam=eg...

"Age: 0" HTTP Header

Does any one know, what does the HTTP header "Age" is for in general, and what does this specific one means: "Age: 0" Thanks ...

Correctly setting headers so a file can be downloaded via a proxy using PHP

I'm finding it difficult to phrase this question correctly, let me try to explain our problem... We have an intranet running on Ubunutu box with Apache2/PHP 5.2.4. We have a bit of PHP code that reads a file from a directory that is not publically accessible and output it to the screen (code below): $file_path = '/home/path/to/filenam...

include after PHP 404 header returning "Oops! This link appears to be broken."

To make a long story short, I have dynamic pages on a website that display reviews. If there are no reviews associated with a particular city/county/area/etc the mysql query returns 0 rows which triggers the following code: if (!$validRevQuery) { header("HTTP/1.0 404 Not Found"); include("http://{$PDS['site']}/404.php?request="....

How to Modify HTTP Header of a request using C#?

Hi, I was trying to modify a HTTP Header using C#. I tried to manipulate the Request.Headers on Page preinit event. But when i try to set anything to the Headers, i get PlatformNotSupportedException. Since We can not set a new NameValueCollection to Reqeust.Headers, I tried to set the value using following code: Request.Headers.Set(Htt...

how to set content-disposition = attachment via javascript ?

can I set content-disposition = attachment via javascript. Basically, I would like to force a "SaveAs" operation after a page has loaded via Javascript, using Firefox. How can I do this ? ...

How to access HTTP headers in Spring-ws endpoint?

How can I access HTTP headers in Spring-ws endpoint? My code looks like this: public class MyEndpoint extends AbstractMarshallingPayloadEndpoint { protected Object invokeInternal(Object arg) throws Exception { MyReq request = (MyReq) arg; // need to access some HTTP headers here return createMyResp(); } } invoke...

Last-Modified not working for .htaccess

I'm tyring to implement browser caching and follow Google PageSpeed's recommendation about setting Last-Modified to a data that is "sufficiently far enough in the past." I have the following in my .htaccess: <IfModule mod_headers.c> <FilesMatch "\.(json|pdf|swf|bmp|gif|jpeg|jpg|png|svg|tiff|ico|flv|js)$"> Header Set Last-Modified "Fr...

How to add to HTTP header uncompressed size of file?

I am using Apache server to serve static content using mod_gzip module in Apache. Is there a method to add the uncompressed size in headers sent to the client? ...

how do i get http header values from a post request.

Hi Guys, See what I'm trynig to do is on a post request made collect the http headers and then add them to app.Request.Headers.Add(). In my application basically another post request overides certain post requests that I make. On each request to my server there is a redirection to another server which adds some headers over my origina...