Skip to content

Regular USP files don't work when --enable-captive-portal is set #80

@talawahtech

Description

@talawahtech

Hi,

I have been playing around with ULib after seeing how impressive the performance was on the Techempower benchmarks, and I was trying to see what the performance is like while using a more standard .usp file instead of the hyper-optimized version used in the Techempower tests. However when I try it using the same docker configuration used in the Techempower test, my simple .usp file does not work e.g.

<!--#header
Content-Type: text/plain
-->
Hello, World!

Then I run curl against the endpoint this is the response that I get:

root@ip-xxx-xxx-xxx-xxx:/# curl -v http://server/plain
*   Trying xxx.xxx.xxx.xxx...
* TCP_NODELAY set
* Connected to server (xxx.xxx.xxx.xxx) port 8080 (#0)
> GET /plain HTTP/1.1
> Host: server:8080
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 27 Apr 2020 01:27:23 GMT
< Server: ULib
< Content-Type: text/plain
* no chunk, no close, no size. Assume close to signal end
<

And the body is not returned. I looked at the code and played around with the feature flags until I realized which one was causing the problem. When --enable-captive-portal is used, simple .usp files no longer work, but the techempower optimized ones do. Is this a bug?

This is the configure command that I used in my test:

RUN ./configure --prefix=$ULIB_ROOT \
    --disable-static --disable-examples --disable-plugins \
    --disable-log --disable-alias --enable-captive-portal \
    --without-ssl --without-pcre --without-expat \
    --without-libz --without-libuuid --without-magic --without-libares \
    --without-libzopfli --without-libbrotli \
	--enable-static-server-plugin=http

When I remove --enable-captive-portal from the configure command, .usp files work again, but performance of the optimized json and plaintext examples drops by about 30%

Activity

changed the title [-]USP files don't work when --enable-captive-portal is set[/-] [+]Regular USP files don't work when --enable-captive-portal is set[/+] on Apr 27, 2020
stefanocasazza

stefanocasazza commented on May 23, 2020

@stefanocasazza
Owner

Yes, it is a bug...

talawahtech

talawahtech commented on May 24, 2020

@talawahtech
Author

@stefanocasazza ok thanks for confirming. Are you able to provide a some insight as to what the issue is? Why is --enable-captive-portal required and why does it affect the performance like that?

stefanocasazza

stefanocasazza commented on May 24, 2020

@stefanocasazza
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @stefanocasazza@talawahtech

        Issue actions

          Regular USP files don't work when --enable-captive-portal is set · Issue #80 · stefanocasazza/ULib