libsoup server

I'm trying to build a small server using libsoup but seem to get into
trouble early on. The following app seems to listen on port 8888 just fine
but when I send a request with Firefox sits there saying "Waiting for
localhost..." and nothing happens:

int main( int argc, char *argv[] ) {
    SoupServer *soup_server = soup_server_new(SOUP_SERVER_PORT , 8888, NULL);
    return 0;

Using strace on this app results in the following output:

fcntl64(6, F_GETFL)                     = 0x802 (flags O_RDWR|O_NONBLOCK)
read(6, "GET / HTTP/1.1\r\nHost: localhost:"..., 8192) = 396
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
write(6, "HTTP/1.1 404 Not Found\r\n\r\n", 26) = 26
rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
read(6, 0x83717a0, 8192)                = -1 EAGAIN (Resource temporarily

So it seems libsoup is sending out the expected 404 error (since no handler
is defined) but for some reason the response doesn't arrive at the other
end. Can somebody tell me what I am doing wrong here?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]