<div dir="ltr"><div>A simple fix for now:<br></div><div style="margin-left:40px">add -H 'Expect:' 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"><<a href="mailto:bzawisza@stevens.edu" target="_blank">bzawisza@stevens.edu</a>></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 "Expect: 100-continue" 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"><<a href="mailto:bsmith8@stevens.edu" target="_blank">bsmith8@stevens.edu</a>></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 '#!/bin/sh'.<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>
> POST /cgi-bin/hw5-2.cgi HTTP/1.1<br>
> 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>
> User-Agent: curl/7.58.0<br>
> Accept: */*<br>
> Content-Length: 1500<br>
> Content-Type: application/x-www-form-urlenco<wbr>ded<br>
> Expect: 100-continue<br>
><br>
< HTTP/1.1 417 Expectation Failed<br>
< Content-Type: text/html<br>
< Content-Length: 275<br>
< Server: bozohttpd/20170201<br>
< Allow: GET, HEAD, POST<br>
* HTTP error before end of send, stop sending<br>
<<br>
<html><head><title>417 Expectation Failed</title></head><br>
<body><h1>417 Expectation Failed</h1><br>
/cgi-bin/hw5-2.cgi: <pre>Expectations not available</pre><br>
<hr><address><a<br>
href="<a href="http://ip-10-239-226-139.ec2.internal/" rel="noreferrer" target="_blank">http://ip-10-239-226-139<wbr>.ec2.internal/</a>">ip-10-239-226-<wbr>139.ec2.internal</a></address><br>
</body></html><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 <<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>> wrote:<br>
> Bradford O Smith <<a href="mailto:bsmith8@stevens.edu" target="_blank">bsmith8@stevens.edu</a>> wrote:<br>
><br>
>> The command I have been using is:<br>
>><br>
>> curl --data-binary @<script> <url><br>
>><br>
>> Where <script> is the filename of my script and <url> is:<br>
>> <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>
><br>
> This is the correct way to submit the script.<br>
><br>
> How does your script start? The server will save it and try to execute<br>
> it, so it needs a valid hash-bang, for example.<br>
><br>
> What's the output of curl when you add '-v' ?<br>
><br>
> -Jan<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>
______________________________<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>