[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [[CPROG] HTTP-response]



sslug@sslug wrote:
>Jeg sidder og roder med mit lille serverprogram. Jeg kan fint få det til >at
køre når jeg bruger GET, altså i en HTML-form skriver method="GET"... >Det
virker i både Netscape og Internet Explorer. 

Forskellen på get og post, er at for den ene så appender
http deamonen form svaret på kommandolinien, som dit
program modtager, for den anden form svaret på stdin.
I begge tilfælde er responset URL 'enkrypteret'.

> Problemet kommer når jeg prøver at bruge POST, så staller IE
> fuldstændig. Netscape lader sig ikke skræmme, men IE påstår
> serveren (mit program) har returneret et ugyldigt svar.

Hvis du ikke bruger svaret til noget, men bare sender en
dummy text, så bør get/post give præcist det samme.

>HTTP/1.0 200 Document follows(\n)
>Server: TEST/0.1(\n)
>Content-Type: text/html(\n)
>Content-Length: 4(\n)
>(\n)(\r)
>TEST

Normalt så klarer jeg mig med 
cout << "Content-Type: text/html\n\n";
cout << "<html>...</html>\n";

> Er der nogen som ved hvorfor Netscape godtager ovenstående men ikke IE? 
Problemet er Bill.

Hvad for http deamon bruger du? Hvis dit program crasher af 
en eller anden grund, f.x fordi du forsøger at læse data
på stdin, når du har fået dem på kommandolinien, så vil
httpd'en aldrig få afsluttet programmet, og derfor kan den
ikke sende data tilbage, fordi content-length er ukendt.
Derfor vil browseren stalle. Evt. kunne du flushe stdin
til en fil, og så se hvad præcist du modtager fra de to
browsere.

    from zqex

____________________________________________________________________
More than just email--Get your FREE Netscape WebMail account today at http://home.netscape.com/netcenter/mail


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *