Commit Graph

67 Commits

Author SHA1 Message Date
Coldfirex 4a850ca730 PoorMan: update thttpd from 2.25b to 2.29
http://www.acme.com/software/thttpd/#releasenotes
Compiled on 32 and 64bit, ran PoorMan, and verified it served webpage and shows logs correctly.

Change-Id: I23fdf0f9910089aa8e24bb66ed7fb49b065b5577
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4404
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-10-12 14:15:53 +00:00
Jérôme Duval 08b9db66ac 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>
2021-02-01 19:35:02 +00:00
Jeremy Visser 6011ce6c74 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>
2020-12-23 10:48:38 +00:00
Augustin Cavalier 1a3518cf75 Add missing includes after previous commit. 2020-07-02 19:34:54 -04:00
Augustin Cavalier 5b189b0e1e HaikuDepot & PoorMan: Disable -Werror.
Unlike the last commit, I am not sure whether the memcpy/memsets
in here are properly safe to do. (They look OK, but a lot of them
involve template classes that probably should not make such
assumptions.)

But the code has worked so far, so let's disable the -Werror so
we can move forward with GCC 8 for now.
2019-05-24 14:23:12 -04:00
Murai Takashi 12dba4e70f poorman: Fix PVS 922
Remove unneed appending a null character, since inet_ntop() adds null to 'addr'.

Change-Id: I21f5be7f737badd388f36a6dcf56a3b446b5d91c
Reviewed-on: https://review.haiku-os.org/795
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2018-12-25 17:49:30 +00:00
Augustin Cavalier 7457ccb4b2 BMessageFormat: Rename to BStringFormat.
The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.

OK'ed by PulkoMandy and Humdinger.
2018-08-13 20:49:00 -04:00
Kevin Wojniak 4d8811742f 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.
2017-03-12 10:39:09 +01:00
Augustin Cavalier 79d6f0870e PoorMan: Fix 'resizing mode or flags swapped', trim trailing space. 2016-10-22 02:57:04 -04:00
Adrien Destugues 385ee03ba8 Fix mixed indentation.
This file uses a mix of tab styles, which gcc6 will warn about because
it sees "misleading indentation". Fix the function where this happens.

Fixes #12759.
2016-08-21 16:53:45 +02:00
Humdinger 3c5208e439 Improve/fix layout
Some tweaks to the layout of apps/prefs in the course of using
B_USE_WINDOW_SPACING.
2015-11-07 17:40:22 +01:00
Humdinger d0ac609964 Use B_USE_WINDOW_SPACING
Use B_USE_WINDOW_SPACING as inset from contents to window border.
Some whitespace cleanup.
2015-11-07 17:40:16 +01:00
Janus 85892ec52f PoorMan: Autoresize window.
* Fix #9244.
2015-05-16 16:25:13 +02:00
Adrien Destugues 46d4471af7 PoorMan: better labelling of button
According to the HIG, button labels should be verbs implying actions.
Replace the "default" button with "create public_html", which is what
will happen if you click it.

Thanks to KapiX for the suggestion.
2014-11-24 08:44:17 +01:00
Adrien Destugues 40afabe6a3 PoorMan: use B_WIDTH_FROM_WIDEST BTabView
Avoids truncation of the tab titles with Russian locale.
2014-10-19 13:16:11 +02:00
Adrien Destugues e962d1552d Don't use unsafe strcpy. 2014-10-10 11:58:32 +02:00
Adrien Destugues d41ee54e6a Fix corrupted text in poorman slider
UpdateText must return a pointer to a fixed buffer, whcih BString.String
isn't, if the sctring is modified.

Copy the data to a char* we can use as a fixed position buffer.
2014-10-09 21:28:18 +02:00
Adrien Destugues 961fdd8cc3 BMessageFormat: parse the pattern at construction
* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)
2014-10-08 15:12:48 +02:00
Adrien Destugues 0e7fcd84af PoorMan: use BMessageFormat. 2014-10-08 13:38:32 +02:00
Adrien Destugues e3857211d3 Move DateTimeFormat and NumberFormat out of BLocale
* ... and adjust all callers
* Remove NumberFormatImpl: we rely on ICU to provide this and it can be
fully wrapped into the C++ file. The class was a stub anyway.
* "Monetary" format is included in NumberFormat for now. There may be a
more generic solution to handle monetary and BTimeUnitFormat (and other
arbitrary units)
2014-10-02 09:19:54 +02:00
Oliver Tappe 87e8603d9f Merge branch 'gcc_syslibs'
* From now on, the gcc-specific system libraries (libgcc, libsupc++ and
  libstdc++) are provided by separate packages built along with gcc:
  - gcc_syslibs contains the shared libraries (libgcc_s.so, libsupc++.so and
    libstdc++.so)
  - gcc_syslibs_devel contains the static libraries and both c++ and gcc
    headers
  The shared libraries now make proper use of symbol versioning and there
  are version-specific symlinks
* The buildsystem has been adjusted to no longer use the libraries and
  headers from the cross-compiler, but use the ones provided by the
  above-mentioned packages. The only exception is that the 32-bit libraries
  required for the bootloader of the x86_64 architecture are still taken
  from the cross-compiler.
2014-08-13 13:50:29 +02:00
Oliver Tappe 220d040227 Use libstdc++, libsupc++ and libgcc from gcc_syslibs.
* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
  from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
  x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
  necessary since we're only using libgcc-as-single-object for libroot
  with x86_gcc2, where the filtered object file doesn't exist. Should
  the objects that used to be filtered cause any problems as part of
  libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
  x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
  x86_gcc2, we still build libstdc++.so from the sources in the Haiku
  source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.
2014-08-13 13:32:44 +02:00
Jérôme Duval 3aeed6607c include strings.h where appriopriate...
instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949
2014-08-08 22:40:37 +02:00
Oliver Tappe 1a7bcf6962 Lots of B_PRI... insertions to fix errors with DEBUG=1. 2014-06-02 02:00:28 +02:00
Ingo Weinhold b0944c78b0 More work towards hybrid support
* All packaging architecture dependent variables do now have a
  respective suffix and are set up for each configured packaging
  architecture, save for the kernel and boot loader variables, which
  are still only set up for the primary architecture.
  For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
  and TARGET_LIBSTDC++ are set to the respective values for the primary
  packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
  multiple packaging architectures. Generally the respective targets are
  (additionally) gristed with the packaging architecture. For libraries
  the additional grist is usually omitted for the primary architecture
  (e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
  Jamfiles for targets built only for the primary architecture don't
  need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
  cross devel package as well as for libbe (untested).
2013-08-01 08:54:06 +02:00
Sergei Reznikov 7f4d1af49d Compilation fixes for x86_64.
Added quite a few missing components to image:

alert arp bc CortexAddOnHost

CDPlayer CharacterMap DeskCalc
Devices DiskUsage Expander LaunchBox MediaConverter NetworkStatus
PoorMan Pulse Screenshot ShowImage SoundRecorder TV Workspaces

DataTranslations Media Printers ScreenSaver

BSnow Cortex FontDemo OverlayImage Pairs

cddb_daemon midi_server power_daemon print_server print_addon_server

Canon LIPS3 Compatible Canon LIPS4 Compatible Gutenprint
PCL5 Compatible PCL6 Compatible PDF Writer PS Compatible

libgame.so libmedia.so

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
2013-01-04 18:45:22 +00:00
Olivier Coursière a6f39df3f7 Poorman : avoid a double free in ls method. Should fix #8617.
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2012-12-09 08:38:08 -05:00
Humdinger 79650056f0 Fixed control label in Poorman settings.
The BTextControls were using the wrong constructor.
Fixes #9024.
+alpha4
2012-09-24 17:53:51 +02:00
Humdinger aed3510485 Close alerts with ESCAPE key.
Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.
2012-08-05 19:32:46 +02:00
Alex Wilson 3bbf781c1a Fix #8706 in Poorman - Selecting a web dir
There is no 'name' entry in the message from a B_OPEN_PANEL BFilePanel.
Also fix a little memory leak along the way.
2012-07-16 14:59:38 +12:00
Alex Wilson 0a96da93d1 Fix style on inline methods in PoorMan. 2012-07-16 14:59:36 +12:00
Alex Wilson c5a09a88e9 In PoorMan: use templatized layout builders.
Also clean up layout a bit.
2012-07-16 14:59:35 +12:00
Alex Wilson a1ae802279 Convert Poorman to use the Layout API.
Also includes many style fixes.

This patch was done by tokyo6pm, and then updated by mks after changes
to Poorman broke the patch.

ticket: #3787
2012-07-16 14:59:33 +12:00
Oliver Tappe 546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00
Jerome Duval 5c6b9eb00d Some fixes for GCC 4.6 warning: variable set but not used 2012-02-23 20:32:13 +01:00
Philippe Saint-Pierre a633338fbe Memory leak fix
CID 5769
2011-11-26 21:57:05 -05:00
Jonas Sundström 11c7ff531a Removing most About windows and menu items as discussed here
http://www.freelists.org/post/haiku-commits/r40968-in-haikutrunksrcapps-activitymonitor-bootmanager-charactermap-codycam-deskbar,3
Leaving them for now in replicants, and in Terminal, according to (my interpretation of) the instructions here
http://dev.haiku-os.org/browser/haiku/trunk/src/apps/terminal/README.GPL_to_OBOS#L70
Some sporadic cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-26 02:18:52 +00:00
Jonas Sundström 560ff4478d Use resource definition files instead of DoCatalogs rule. Rename B_TRANSLATE_APP_NAME and related macros to the more generic B_TRANSLATE_SYSTEM_NAME, to also fits add-ons, folders, etc, and make 'System name' its standard context. Change CodyCam and PoorMan's app signatures to match the overall x-vnd.Haiku-App pattern. Some clean-up. Make SlideShowSaver build again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-25 22:13:48 +00:00
Jonas Sundström b97c51490a Making use of B_TRANSLATE_APP_NAME, BAboutMenuItem, BAboutWindow. Clean-up. Removal of some ellipsis. ('About Haiku' in Deskbar.)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-16 00:42:18 +00:00
Siarzhuk Zharski 5dbce74310 Unused string constant removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-13 09:39:44 +00:00
Siarzhuk Zharski 52cca4eef5 Removed excessive internationalization in PoorMan and DeskCalc.
The names of settings files should not be localized. Pointed by 
Sergei Reznikov (Diver). Thanx!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-06 21:56:24 +00:00
Adrien Destugues 2813f49667 Pathc by Dziadek: localize Poorman. thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-29 10:42:21 +00:00
Oliver Tappe ba2f29ad26 * fix warnings in poorman
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 17:09:29 +00:00
Stefano Ceccherini 25e4ba1fe4 The BMessengers were leaked. CID 1731.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-14 10:41:29 +00:00
Adrien Destugues cac07c64e8 CID 1981 : NULL pointer dereference on error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-13 12:23:18 +00:00
Oliver Tappe eddec292d5 * 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
2010-07-21 21:43:20 +00:00
Matt Madia 1277e13adc Updated PoorMan's icon to utilize Misc_Earth as the globe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-04 13:25:12 +00:00
Stephan Aßmus 7974d3dcf3 Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-13 14:33:35 +00:00
Philippe Saint-Pierre fc7d806ef9 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
2009-12-19 21:08:25 +00:00
Jonas Sundström 8362330647 Resource clean-up. Removing bitmap icons. Updating copyright dates. Removing dead code and redundant comments. Ending files in a newline.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-19 19:08:43 +00:00