[cs615asa] HTTP 417 from Part 2 CGI

Brian Zawisza bzawisza at stevens.edu
Sat Apr 7 19:52:50 EDT 2018


I am also receiving the same error with part 3.
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.
Perhaps, it may be related to the content-length. My part 2 is
significantly smaller [699] than part 3 [2650].

-Brian

On Sat, Apr 7, 2018 at 6:10 PM, Bradford Smith <bsmith8 at stevens.edu> wrote:

> My script starts with '#!/bin/sh'.
>
> The output of curl with -v is:
>
> *   Trying 54.145.67.75...
> * TCP_NODELAY set
> * Connected to ec2-54-145-67-75.compute-1.amazonaws.com (54.145.67.75)
> port 80 (#0)
> > POST /cgi-bin/hw5-2.cgi HTTP/1.1
> > Host: ec2-54-145-67-75.compute-1.amazonaws.com
> > User-Agent: curl/7.58.0
> > Accept: */*
> > Content-Length: 1500
> > Content-Type: application/x-www-form-urlencoded
> > Expect: 100-continue
> >
> < HTTP/1.1 417 Expectation Failed
> < Content-Type: text/html
> < Content-Length: 275
> < Server: bozohttpd/20170201
> < Allow: GET, HEAD, POST
> * HTTP error before end of send, stop sending
> <
> <html><head><title>417 Expectation Failed</title></head>
> <body><h1>417 Expectation Failed</h1>
> /cgi-bin/hw5-2.cgi: <pre>Expectations not available</pre>
> <hr><address><a
> href="http://ip-10-239-226-139.ec2.internal/">ip-10-239-
> 226-139.ec2.internal</a></address>
> </body></html>
> * Closing connection 0
>
> Bradford
>
> On Sat, Apr 7, 2018 at 5:57 PM, Jan Schaumann <jschauma at stevens.edu>
> wrote:
> > Bradford O Smith <bsmith8 at stevens.edu> wrote:
> >
> >> The command I have been using is:
> >>
> >>     curl --data-binary @<script> <url>
> >>
> >> Where <script> is the filename of my script and <url> is:
> >> http://ec2-54-145-67-75.compute-1.amazonaws.com/cgi-bin/hw5-2.cgi.
> >
> > This is the correct way to submit the script.
> >
> > How does your script start?  The server will save it and try to execute
> > it, so it needs a valid hash-bang, for example.
> >
> > What's the output of curl when you add '-v' ?
> >
> > -Jan
> > _______________________________________________
> > cs615asa mailing list
> > cs615asa at lists.stevens.edu
> > https://lists.stevens.edu/mailman/listinfo/cs615asa
> _______________________________________________
> cs615asa mailing list
> cs615asa at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs615asa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs615asa/attachments/20180407/ec6bc968/attachment.html>


More information about the cs615asa mailing list