History log of /haiku/src/apps/poorman/PoorManServer.cpp
Revision Date Author Comments
# 958b83c3 25-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

PoorMan: Default to UTF-8 character set.

Ideally we would default to no character set, but
libhttpd does not seem to support that.

Fixes #18424.


# 08b9db66 01-Feb-2021 Jérôme Duval <jerome.duval@gmail.com>

poorman: handle EINTR on poll()

Change-Id: I549db55a408063bbddf71d5ce15c0286bf36bc69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3727
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 6011ce6c 20-Dec-2020 Jeremy Visser <jeremyvisser@google.com>

PoorMan: Add dual-stack IPv6 support

This change adds dual-stack IPv6 support to the PoorMan web server,
which will listen on all available IPv4 and IPv6 addresses and
respond to both.

This change also does some necessary plumbing to support the
output of nicely-formatted IPv6 addresses for request logging.

Change-Id: I0ce7691222f0233e2e098d67e6293b9e58d7486d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3539
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 4d881174 25-Feb-2017 Kevin Wojniak <kainjow@users.noreply.github.com>

Fix client hang when HEAD request is sent to PoorMan

If a HEAD request was sent to PoorMan, for example from curl
("curl --HEAD http://x.x.x.x") then the client would hang due to the connection
never being closed.

In PoorManServer::_Worker, after httpd_start_request() is called, a null
file_address is used to detect when libhttpd has already sent a directory
listing. In this situation, PoorMan assumes libhttpd already fully handled the
request. However httpd_start_request() didn't properly set this flag for HEAD
requests. In the if block for a null file_address, the file descriptor was
incorrectly invalidated, which prevented the connection from closing. Fixing
this revealed two more bugs. The first is libhttpd was not actually sending
the http headers for HEAD directory listing requests. The second is
PoorManServer would increment its hit count for HEAD directory listing
requests. This change also refactors file_address to a more sensible name and
type that reflects its use.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13347.


# 5c6b9eb0 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# cac07c64 12-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 1981 : NULL pointer dereference on error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38082 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eddec292 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc7d806e 19-Dec-2009 Philippe Saint-Pierre <stpere@gmail.com>

PoorMan Server : fix for several style violations (blanks between operators,
blanks after commas, 80 chars/line)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34712 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d939e03d 17-Aug-2009 Philippe Saint-Pierre <stpere@gmail.com>

PoorMan: Close the application when you choose Cancel on first launch.
* If you choose cancel on that first dialog, also don't save a config file
* Also fixes the button labelling in the preference panel (several were clipped)
* Allow the user to cancel the selection of the web folder and return to the initial dialog (to choose Default, for example)
* Make the preference panel closable with escape key
* Multiple coding style changes

(Ref: Ticket #4255)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 000fe088 04-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Patch by Ma Jie: Basically - make Poorman (the webserver) work. Libhttpd from
Jef Poskanzer is providing the backend, but had to be adopted in some ways.
Other issues in Poorman have been resolved.

When testing the license integration, I stumbled over some AboutSystem bugs,
basically clicking licenses would not open them. I fixed those in this patch,
sorry for mixing that up.

Note to Ma Jie: I changed the encoding of the libhttpd files to UTF-8!
(This affects only the (C) glyph.) Thanks a lot for your awesome work on
Poorman, it's really appreciated!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29906 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c6b9eb00d0d623c12f72eb82a471cb4c71f4f33 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# cac07c64e842dda7a2af6ecf4966b531b3b160a9 12-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 1981 : NULL pointer dereference on error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38082 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eddec292d5dd8251a00851880e16e6a5c07c1e3f 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc7d806ef9267052a388bf932c3cbe9ac1211e75 19-Dec-2009 Philippe Saint-Pierre <stpere@gmail.com>

PoorMan Server : fix for several style violations (blanks between operators,
blanks after commas, 80 chars/line)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34712 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d939e03d05cfde5de7e3191d519dd10b69f348c6 17-Aug-2009 Philippe Saint-Pierre <stpere@gmail.com>

PoorMan: Close the application when you choose Cancel on first launch.
* If you choose cancel on that first dialog, also don't save a config file
* Also fixes the button labelling in the preference panel (several were clipped)
* Allow the user to cancel the selection of the web folder and return to the initial dialog (to choose Default, for example)
* Make the preference panel closable with escape key
* Multiple coding style changes

(Ref: Ticket #4255)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 000fe088a79bbd17ce42078273c04b306967827f 04-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Patch by Ma Jie: Basically - make Poorman (the webserver) work. Libhttpd from
Jef Poskanzer is providing the backend, but had to be adopted in some ways.
Other issues in Poorman have been resolved.

When testing the license integration, I stumbled over some AboutSystem bugs,
basically clicking licenses would not open them. I fixed those in this patch,
sorry for mixing that up.

Note to Ma Jie: I changed the encoding of the libhttpd files to UTF-8!
(This affects only the (C) glyph.) Thanks a lot for your awesome work on
Poorman, it's really appreciated!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29906 a95241bf-73f2-0310-859d-f6bbb57e9c96