[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: help
From: "Leong, Gary" <Gary.Leong () nasdaq ! com>
Date: 2007-08-20 19:22:00
Message-ID: FD98A53269F5F74082DFBB12E8AA60320B0DF3F1 () TRM-EXCH1 ! CORP ! NASDAQ ! COM
[Download RAW message or body]
-----Original Message-----
From: busybox-bounces@busybox.net [mailto:busybox-bounces@busybox.net]
On Behalf Of busybox-request@busybox.net
Sent: Monday, August 20, 2007 3:33 PM
To: busybox@busybox.net
Subject: busybox Digest, Vol 25, Issue 28
Send busybox mailing list submissions to
busybox@busybox.net
To subscribe or unsubscribe via the World Wide Web, visit
http://busybox.net/cgi-bin/mailman/listinfo/busybox
or, via email, send a message with subject or body 'help' to
busybox-request@busybox.net
You can reach the person managing the list at
busybox-owner@busybox.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of busybox digest..."
Today's Topics:
1. Re: [PATCH] httpd - User defined error pages (Pierre M?tras)
2. Re: [PATCH] httpd - User defined error pages (Denys Vlasenko)
----------------------------------------------------------------------
Message: 1
Date: Mon, 20 Aug 2007 15:02:48 -0400
From: Pierre M?tras <genepi@sympatico.ca>
Subject: Re: [PATCH] httpd - User defined error pages
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: busybox@busybox.net
Message-ID: <200708201502.49033.genepi@sympatico.ca>
Content-Type: text/plain; charset=iso-8859-1
Hi Denys,
Le 20 Ao?t 2007 13:07, Denys Vlasenko a ?crit?:
> On Monday 20 August 2007 14:39, Pierre M?tras wrote:
> > Hi,
> >
> > Here is my patch to support user defined error pages only in httpd,
> > applied to the current SVN version.
>
> +static SKIP_FEATURE_HTTPD_ERROR_PAGES(const) HttpEnumString
> httpResponseNames[] = { + { HTTP_OK, "OK", NULL
> USE_FEATURE_HTTPD_ERROR_PAGES(, NULL) },
>
> Removal of "const" enlarged data segment by 144 bytes:
>
> $ size */*/httpd.o
> text data bss dec hex filename
> 9075 0 0 9075 2373 busybox.t4/networking/httpd.o
> 9247 144 0 9391 24af busybox.t5/networking/httpd.o
>
> It's possible to avoid this by converting httpResponseNames[] array
> into separate arrays for type, strings, and error page names,
> and putting error page names into "struct globals".
I wanted this change to have the less impact on existing code, because
not
everybody needs to have custom error pages support (in my case, that's
for
adds removal on my router). That's why I used the existing struct array
and
moved from const to data segment, conditionnaly when this feature was
used.
When this feature is not set, there is no impact on the program size:
function old new delta
send_file_and_exit 338 352 +14
handle_incoming_and_exit 1810 1812 +2
parse_conf 1170 1160 -10
------------------------------------------------------------------------
------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-10) Total: 6
bytes
But that's even better with your changes!
>
> That's what I did in attached version of httpd.c.
>
> Can you confirm that it still works for you?
>
It works fine on my side with my small test case.
Thanks
-- Pierre M?tras
------------------------------
Message: 2
Date: Mon, 20 Aug 2007 18:07:32 +0100
From: Denys Vlasenko <vda.linux@googlemail.com>
Subject: Re: [PATCH] httpd - User defined error pages
To: busybox@busybox.net
Cc: Pierre M?tras <genepi@sympatico.ca>
Message-ID: <200708201807.33038.vda.linux@googlemail.com>
Content-Type: text/plain; charset="iso-8859-15"
On Monday 20 August 2007 14:39, Pierre M?tras wrote:
> Hi,
>
> Here is my patch to support user defined error pages only in httpd,
applied
> to the current SVN version.
+static SKIP_FEATURE_HTTPD_ERROR_PAGES(const) HttpEnumString
httpResponseNames[] = {
+ { HTTP_OK, "OK", NULL USE_FEATURE_HTTPD_ERROR_PAGES(, NULL) },
+ { HTTP_MOVED_TEMPORARILY, "Found", "Directories must end with a
slash." USE_FEATURE_HTTPD_ERROR_PAGES(, NULL) },
I still don't like USE_FEATURE_HTTPD_ERROR_PAGES(, NULL),
which just make code even more unreadable than it was.
Removal of "const" enlarged data segment by 144 bytes:
$ size */*/httpd.o
text data bss dec hex filename
9075 0 0 9075 2373 busybox.t4/networking/httpd.o
9247 144 0 9391 24af busybox.t5/networking/httpd.o
It's possible to avoid this by converting httpResponseNames[] array
into separate arrays for type, strings, and error page names,
and putting error page names into "struct globals".
That's what I did in attached version of httpd.c.
Can you confirm that it still works for you?
> There were a lot of refactoring of httpd.c code
> in the last days and it's becoming more and more difficult for me to
track
> the changes.
Sorry :(
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.c
Type: text/x-csrc
Size: 58335 bytes
Desc: not available
Url :
http://busybox.net/lists/busybox/attachments/20070820/248e9545/attachmen
t.c
------------------------------
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
End of busybox Digest, Vol 25, Issue 28
***************************************
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic