Re: Return application octet-stream data

Jay Sprenkle <[email protected]> Tue, 18 Sep 2012 15:30:48 -0500
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <CAG19Bi4z+EVMe59LuPyBh+eW04TVk+oP6CsyikT_20h4DxU5Tg@mail.gmail.com>
--===============4751824115781470936==
Content-Type: multipart/alternative; boundary=20cf300fb31bf7645704c9ffc351

--20cf300fb31bf7645704c9ffc351
Content-Type: text/plain; charset=ISO-8859-1

Glad that helped.
I recall trying to get fastcgi working and being very frustrated.


On Tue, Sep 18, 2012 at 3:26 PM, Noah Silverman <[email protected]>wrote:

> Jay,
>
> That did it!!!
>
> Thank you so much!
>
>
> --
> Noah
>
>
> On Sep 18, 2012, at 12:26 PM, Jay Sprenkle <[email protected]> wrote:
>
>
> Try something like this:
>
> bid_response.SerializeToString(&post_response)
> cout << "Status: 200 OK\r\n";
> cout << "Content-type: application/octet-stream\r\n";
> cout << "Content-Length:  add-your-response-length here\r\n\r\n"
> cout.write( post_response, add-your-response-length here );
> cout << "\n";
>
>

--20cf300fb31bf7645704c9ffc351
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Glad that helped.<div>I recall trying to get fastcgi working and being very=
 frustrated.</div><div><br><br><div class=3D"gmail_quote">On Tue, Sep 18, 2=
012 at 3:26 PM, Noah Silverman <span dir=3D"ltr">&lt;<a href=3D"mailto:noah=
@smartmediacorp.com" target=3D"_blank">[email protected]</a>&gt;</spa=
n> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div style=3D"word-wrap:break-word"><div>Jay=
,</div><div><br></div><div>That did it!!!</div><div><br></div><div>Thank yo=
u so much!</div>
<div><br></div><br><div>
<div>--</div><div>Noah</div><br>

</div><div><div class=3D"h5">
<br><div><div>On Sep 18, 2012, at 12:26 PM, Jay Sprenkle &lt;<a href=3D"mai=
lto:[email protected]" target=3D"_blank">[email protected]</a>&gt; wrot=
e:</div><br><blockquote type=3D"cite"><div><br></div><div>Try something lik=
e this:</div>
<div><br></div><div><span style=3D"color:rgb(80,0,80);font-size:13px;font-f=
amily:arial,sans-serif">bid_response.</span><span style=3D"color:rgb(80,0,8=
0);font-size:13px;font-family:arial,sans-serif">SerializeToString(&amp;post=
_</span><span style=3D"color:rgb(80,0,80);font-size:13px;font-family:arial,=
sans-serif">response)</span><br style=3D"color:rgb(80,0,80);font-size:13px;=
font-family:arial,sans-serif">

<span style=3D"color:rgb(80,0,80);font-size:13px;font-family:arial,sans-ser=
if">cout &lt;&lt; &quot;Status: 200 OK\r\n&quot;;</span><br style=3D"color:=
rgb(80,0,80);font-size:13px;font-family:arial,sans-serif">
<span style=3D"color:rgb(80,0,80);font-size:13px;font-family:arial,sans-ser=
if">cout &lt;&lt; &quot;Content-type: application/octet-stream\r\n</span><s=
pan style=3D"color:rgb(80,0,80);font-size:13px;font-family:arial,sans-serif=
">&quot;;</span></div>

<div><span style=3D"background-color:rgb(255,255,102)"><span style=3D"color=
:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">cout &lt;&lt; &q=
uot;</span><span style=3D"font-family:Consolas,Menlo,Monaco,&#39;Lucida Con=
sole&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstre=
am Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;font-size:14px=
;line-height:18px">Content-Length:=A0</span>
add-your-response-length here\r\n\r\n<span style=3D"font-family:Consolas,Me=
nlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu S=
ans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,mono=
space,serif;font-size:14px;line-height:18px">&quot;</span></span></div>

<div><span style=3D"background-color:rgb(255,255,102)">cout.write( post_res=
ponse, add-your-response-length here );<br style=3D"color:rgb(80,0,80);font=
-family:arial,sans-serif;font-size:13px"></span><span style=3D"color:rgb(80=
,0,80);font-size:13px;font-family:arial,sans-serif">cout &lt;&lt; &quot;\n&=
quot;;</span>
</div><br></blockquote></div></div></div></div></blockquote></div><br>
</div>

--20cf300fb31bf7645704c9ffc351--

--===============4751824115781470936==
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

--===============4751824115781470936==--