Reply to Headers - returning specified HTTP headers from a POST

Your name:

Reply:


Posted by John Smith on 08/11/05 04:56

I'm writing a service which accepts a POST call, updates a database and
returns raw HTTP headers as specified below:

HTTP/1.1 200 OK
Content-type:text/plain
Content-length:3

OK

The code runs, and returns my headers, but only after its own:

HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.1
Date: Wed, 10 Aug 2005 21:45:58 GMT

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Wed, 10 Aug 2005 21:45:58 GMT
Connection: close
Content-type:text/plain
Content-length:3

OK

Here's some static code which replicates the problem:

<?php
header( "HTTP/1.1 200 OK\r\n" );
header( "Content-type:text/plain\r\n" );
header( "Content-length:3\r\n" );
header( "\r\n" );
header( "OK \n" );
exit;
?>

The platform is IIS 5.1 (obviously) and we're using PHP 4.3.10.

If it can't be solved in PHP but can in Perl, ASP or some other language,
please let me know. Likewise if it can be solved on Apache/Linux/PHP 5. I
really didn't expect this to be a problem.

Thanks in advance. Did I mention that this is urgent?

Iain

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация