Skip to content
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

[regression] vibe looses static file requests #401

Closed
MartinNowak opened this issue Nov 22, 2013 · 1 comment
Closed

[regression] vibe looses static file requests #401

MartinNowak opened this issue Nov 22, 2013 · 1 comment

Comments

@MartinNowak
Copy link
Contributor

Reproduce by creating a file that is bigger than 4096 bytes and requesting it with 2 concurrent connections.

#!/bin/sh
DIR=`mktemp -d`/serve
dub init "$DIR" vibe.d
pushd "$DIR"
sed -i 's|"vibe.*>=0.*"|"vibe-d": "~master"|' package.json
cat > source/app.d << CODE
import vibe.d;

shared static this()
{
    auto settings = new HTTPServerSettings;
    settings.port = 8080;

    listenHTTP(settings, serveStaticFiles("."));
}
CODE
dub build
# create a file that is bigger than 4096 bytes
dd if=/dev/zero of=foobar count=1 bs=4097
./serve &
PID=$!
# wait for serve
sleep 1
# second ab request times out after 5 seconds
ab -s 5 -n 2 -c 2 http://localhost:8080/foobar
kill $PID
popd
rm -r "$DIR"
@MartinNowak
Copy link
Contributor Author

Bisecting points to this commit c5a9025.

s-ludwig added a commit that referenced this issue Nov 22, 2013
fix #401 - [regression] vibe looses static file requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant