Re: Return application octet-stream data

Noah Silverman <[email protected]> Tue, 18 Sep 2012 14:57:43 -0700
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
--===============2245098504863317016==
Content-Type: multipart/alternative; boundary="Apple-Mail=_7C9BAF1D-2BA4-4186-A310-647F11A1D4F1"


--Apple-Mail=_7C9BAF1D-2BA4-4186-A310-647F11A1D4F1
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=iso-8859-1

Jay,

Other way around.

Thanks to your help, my fastcgi program now *returns* the binary data =
perfectly.

My new challenge is that it doesn't always properly read the input of =
binary data. =20

What would be a good way to setup the correct file handle to read in the =
binary post data?

--
Noah=20

On Sep 18, 2012, at 2:49 PM, Jay Sprenkle <[email protected]> wrote:

> I don't know of any but I really haven't looked for them.
> I believe the various web servers have differences in how they parse =
the responses.
> It took forever for me to dig out some of the information about what =
Apache expects to receive back from a cgi program.
>=20
> cgicc does html and forms handling:
> http://www.gnu.org/s/cgicc
>=20
> On Tue, Sep 18, 2012 at 4:24 PM, Charles Thomas =
<[email protected]> wrote:
> Yeah... it's a real love-hate relationship for me.  I love fixing the =
problems that I Hate getting.
>=20
> The weirdest one I have had with FastCGI was cross-domain transfer =
from a javascript to fastcgi.  With that one there were some weird =
requirements concerning what headers I could and could not have in the =
request/response.=20
>=20
> Speaking of headers and fastCGI, are there any classes that =
encapsulate the header logic into them?  I know about the fastcgi =
library, and one for Qt  (FastCgiQt), but I was wondering if there are =
any more higher level classes out there?
>=20
> Tom
>=20
> Sent from my iPad
>=20
> On Sep 18, 2012, at 3:54 PM, Jay Sprenkle <[email protected]> wrote:
>=20
>> My guess is that was the issue.
>> The other (terminating the string at the first zero byte) might have =
caused similar problems as well.
>> Computers are so fussy ;)
>>=20
>>=20
>> On Tue, Sep 18, 2012 at 3:49 PM, Charles Thomas =
<[email protected]> wrote:
>> i guess it would help if I read the entire mail message :)... so it =
was the missing Content-Length?
>>=20
>>=20
>=20
>=20
>=20
> --=20
> ---
> "Why do you have that banana in your ear?"=20
> "To keep away the alligators."
> "But there are no alligators here."
> "See! It's working!"
> --
> The Democrats are the left wing.
> The Republicans are the right wing.
> We all know how well a bird flies with just one wing.
>=20


--Apple-Mail=_7C9BAF1D-2BA4-4186-A310-647F11A1D4F1
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=iso-8859-1

<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jay,</div><div><br></div><div>Other way around.</div><div><br></div><div>Thanks to your help, my fastcgi program now *returns* the binary data perfectly.</div><div><br></div><div>My new challenge is that it doesn't always properly read the input of binary data. &nbsp;</div><div><br></div><div>What would be a good way to setup the correct file handle to read in the binary post data?</div><br><div>
<div>--</div><div>Noah&nbsp;</div>

</div>
<br><div><div>On Sep 18, 2012, at 2:49 PM, Jay Sprenkle &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I don't know of any but I really haven't looked for them.<div>I believe the various web servers have differences in how they parse the responses.</div><div>It took forever for me to dig out some of the information about what Apache expects to receive back from a cgi program.</div>
<div><br></div><div>cgicc does html and forms handling:</div><div><span style="color:rgb(0,153,51);font-family:arial,sans-serif;line-height:15px;background-color:rgb(255,255,255)"><a href="http://www.gnu.org/s/">http://www.gnu.org/s/</a></span><b style="color:rgb(0,153,51);font-family:arial,sans-serif;line-height:15px;background-color:rgb(255,255,255)">cgicc</b>
</div><div><br><div class="gmail_quote">On Tue, Sep 18, 2012 at 4:24 PM, Charles Thomas <span dir="ltr">&lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF"><div>Yeah... it's a real love-hate relationship for me. &nbsp;I love fixing the problems that I Hate getting.</div><div><br></div><div>The weirdest one I have had with FastCGI was cross-domain transfer from a javascript to fastcgi. &nbsp;With that one there were some weird requirements concerning what headers I could and could not have in the request/response.&nbsp;</div>
<div><br></div><div>Speaking of headers and fastCGI, are there any classes that encapsulate the header logic into them? &nbsp;I know about the fastcgi library, and one for Qt &nbsp;(FastCgiQt), but I was wondering if there are any more higher level classes out there?</div>
<div><br></div><div>Tom</div><div><br>Sent from my iPad</div><div><div class="h5"><div><br>On Sep 18, 2012, at 3:54 PM, Jay Sprenkle &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt; wrote:<br>
<br></div><div></div><blockquote type="cite">My guess is that was the issue.<div>The other (terminating the string at the first zero byte) might have caused similar problems as well.</div><div>Computers are so fussy ;)<br>
<div><br><br><div class="gmail_quote">On Tue, Sep 18, 2012 at 3:49 PM, Charles Thomas <span dir="ltr">&lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF"><div>i guess it would help if I read the entire mail message :)... so it was the missing Content-Length?</div>

<div><br><br></div></div></blockquote></div>
</div></div>
</blockquote></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>---<br><em style="font-family:Verdana,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">"Why do you have that banana in your ear?"&nbsp;<br>
"To keep away the alligators."<br>"But there are no alligators here."<br>"See! It's working!"</em>
<div><em style="font-family:Verdana,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">--</em></div><div><em style="font-family:Verdana,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">The Democrats are the left wing.</em></div>
<div><em style="font-family:Verdana,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">The Republicans are the right wing.</em></div><div><em style="font-family:Verdana,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">We all know how well a bird flies with just one wing.</em></div>
<br>
</div>
</blockquote></div><br></body></html>
--Apple-Mail=_7C9BAF1D-2BA4-4186-A310-647F11A1D4F1--

--===============2245098504863317016==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers

--===============2245098504863317016==--