-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page is served when the server is stopped! #19
Comments
Same issue here.. After I start the server and open the page in Firefox, it keeps loading forever. But as soon as I CTRL+C the server, the response loads. |
I was able to reproduce this problem as well. |
That would be the keepalive setting. You really want to close the connection after sending the response to have a consistent behavior in browsers:
while nc -Nl 8082 <<< 'HTTP/1.1 200 OK
Connection: close
Content-Type: text/plain
OK'; do ; done see #16 |
That makes sense, but removing the `Connection: keep-alive` does not seem
to fix the issue (at least, in the browsers I've tried).
…On Thu, Aug 20, 2020 at 8:12 AM bendem ***@***.***> wrote:
That would be the keepalive setting. You really want to close the
connection after sending the response to have a consistent behavior in
browsers:
while nc -Nl 8082 <<< 'HTTP/1.1 200 OKContent-Type: text/plainOK'; do ; done
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN4YHC4NLYKTJS7EKMF3TSBUOMJANCNFSM4I3RO3GA>
.
--
Ben
|
You should set it to |
Sorry, I realise I had removed it in my example, added it back. |
Replace |
like it #23 ? |
|
No, you can give a port without the argument cause ncat take ports in parameter already |
When I run it like:
./shinatra.sh 8080 index.html
the page keeps loading. As soon as I terminate it with Ctrl+C, the content is served. Is this the intended behaviour?
The text was updated successfully, but these errors were encountered: