<div dir="ltr"><div>A simple fix for now:<br></div><div style="margin-left:40px">add -H &#39;Expect:&#39; to your curl command<br><br></div>-Brian<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 7, 2018 at 7:52 PM, Brian Zawisza <span dir="ltr">&lt;<a href="mailto:bzawisza@stevens.edu" target="_blank">bzawisza@stevens.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I am also receiving the same error with part 3. <br>After a little debugging I noticed that the curl for part 3 sends an &quot;Expect: 100-continue&quot; header, but the curl for part 2 does not.<br></div>Perhaps, it may be related to the content-length. My part 2 is significantly smaller [699] than part 3 [2650].<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">-Brian<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 7, 2018 at 6:10 PM, Bradford Smith <span dir="ltr">&lt;<a href="mailto:bsmith8@stevens.edu" target="_blank">bsmith8@stevens.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My script starts with &#39;#!/bin/sh&#39;.<br>
<br>
The output of curl with -v is:<br>
<br>
*   Trying 54.145.67.75...<br>
* TCP_NODELAY set<br>
* Connected to <a href="http://ec2-54-145-67-75.compute-1.amazonaws.com" rel="noreferrer" target="_blank">ec2-54-145-67-75.compute-1.ama<wbr>zonaws.com</a> (54.145.67.75)<br>
port 80 (#0)<br>
&gt; POST /cgi-bin/hw5-2.cgi HTTP/1.1<br>
&gt; Host: <a href="http://ec2-54-145-67-75.compute-1.amazonaws.com" rel="noreferrer" target="_blank">ec2-54-145-67-75.compute-1.ama<wbr>zonaws.com</a><br>
&gt; User-Agent: curl/7.58.0<br>
&gt; Accept: */*<br>
&gt; Content-Length: 1500<br>
&gt; Content-Type: application/x-www-form-urlenco<wbr>ded<br>
&gt; Expect: 100-continue<br>
&gt;<br>
&lt; HTTP/1.1 417 Expectation Failed<br>
&lt; Content-Type: text/html<br>
&lt; Content-Length: 275<br>
&lt; Server: bozohttpd/20170201<br>
&lt; Allow: GET, HEAD, POST<br>
* HTTP error before end of send, stop sending<br>
&lt;<br>
&lt;html&gt;&lt;head&gt;&lt;title&gt;417 Expectation Failed&lt;/title&gt;&lt;/head&gt;<br>
&lt;body&gt;&lt;h1&gt;417 Expectation Failed&lt;/h1&gt;<br>
/cgi-bin/hw5-2.cgi: &lt;pre&gt;Expectations not available&lt;/pre&gt;<br>
&lt;hr&gt;&lt;address&gt;&lt;a<br>
href=&quot;<a href="http://ip-10-239-226-139.ec2.internal/" rel="noreferrer" target="_blank">http://ip-10-239-226-139<wbr>.ec2.internal/</a>&quot;&gt;ip-10-239-226-<wbr>139.ec2.internal&lt;/a&gt;&lt;/address&gt;<br>
&lt;/body&gt;&lt;/html&gt;<br>
* Closing connection 0<br>
<span class="m_-3209323541844894069HOEnZb"><font color="#888888"><br>
Bradford<br>
</font></span><div class="m_-3209323541844894069HOEnZb"><div class="m_-3209323541844894069h5"><br>
On Sat, Apr 7, 2018 at 5:57 PM, Jan Schaumann &lt;<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>&gt; wrote:<br>
&gt; Bradford O Smith &lt;<a href="mailto:bsmith8@stevens.edu" target="_blank">bsmith8@stevens.edu</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; The command I have been using is:<br>
&gt;&gt;<br>
&gt;&gt;     curl --data-binary @&lt;script&gt; &lt;url&gt;<br>
&gt;&gt;<br>
&gt;&gt; Where &lt;script&gt; is the filename of my script and &lt;url&gt; is:<br>
&gt;&gt; <a href="http://ec2-54-145-67-75.compute-1.amazonaws.com/cgi-bin/hw5-2.cgi" rel="noreferrer" target="_blank">http://ec2-54-145-67-75.comput<wbr>e-1.amazonaws.com/cgi-bin/hw5-<wbr>2.cgi</a>.<br>
&gt;<br>
&gt; This is the correct way to submit the script.<br>
&gt;<br>
&gt; How does your script start?  The server will save it and try to execute<br>
&gt; it, so it needs a valid hash-bang, for example.<br>
&gt;<br>
&gt; What&#39;s the output of curl when you add &#39;-v&#39; ?<br>
&gt;<br>
&gt; -Jan<br>
&gt; ______________________________<wbr>_________________<br>
&gt; cs615asa mailing list<br>
&gt; <a href="mailto:cs615asa@lists.stevens.edu" target="_blank">cs615asa@lists.stevens.edu</a><br>
&gt; <a href="https://lists.stevens.edu/mailman/listinfo/cs615asa" rel="noreferrer" target="_blank">https://lists.stevens.edu/mail<wbr>man/listinfo/cs615asa</a><br>
______________________________<wbr>_________________<br>
cs615asa mailing list<br>
<a href="mailto:cs615asa@lists.stevens.edu" target="_blank">cs615asa@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs615asa" rel="noreferrer" target="_blank">https://lists.stevens.edu/mail<wbr>man/listinfo/cs615asa</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>