ult but those who don't
need it may disable it.
On Mon, 31 Aug 2020 at 11:25, Bernd Petrovitsch
wrote:
> Hi all!
>
> On Mon, 2020-08-31 at 09:53 +0200, Guillermo Rodriguez Garcia wrote:
> [...]
> > El sáb., 29 ago. 2020 a las 21:37, Sergey Ponomarev
> > () escribió:
>
to know what people is
> using it for since it is mandated by RFC2616 and thus can be assumed
> to be always there.
>
> Guillermo
>
> El dom., 9 ago. 2020 a las 0:24, Sergey Ponomarev
> () escribió:
> >
> > In RFC 2616 sec. 14.18 said that sever MUST send Date heade
yes, but simplifies code. I think that for those who are concerned with one
additional sprintf call can just disable the header.
On Sun, 16 Aug 2020 at 00:07, Denys Vlasenko
wrote:
> On Sun, Aug 9, 2020 at 12:24 AM Sergey Ponomarev
> wrote:
> > @@ -1071,16 +1079,18 @@ static void
/busybox/commits/caching
Sergey Ponomarev (4):
httpd: Update to HTTP/1.1
httpd: Don't add Date header to response
httpd: Don't add Last-Modified header to response
httpd: Support caching via ETag header
networking/httpd.c | 131 ++---
1 file changed
HTTP v1.1 was released in 1999 year and it's time to update BB HTTPD.
Browsers may behave badly with HTTP/1.0
E.g. Chrome not sends the If-None-Match header with ETag.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 16
1 file changed, 8 insertions(+), 8 deletions
In RFC 2616 sec. 14.18 said that sever MUST send Date header.
But in fact the header have sense only for Cache-Control and can be omitted.
In the same time the Date eats power, CPU and network resources which are
critical for embedded systems.
Signed-off-by: Sergey Ponomarev
---
networking
t;hex(last_mod)-hex(file_size)" e.g. "5e132e20-417" (with quotes).
That means that it's not completely reliable as hash functions but fair enough.
The same form of ETag is used by Nginx so load balancing of static content is
safe.
Signed-off-by: Sergey Ponomarev
---
net
can use ETag header.
This simplifies logic and the only downside is that in JavaScript the
document.lastModified will return null.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/networking/httpd.c
Yes, it looks worse but you can see the resulting DOM tree instead
(elements/inspector). TBH as a web developer I almost never looked into raw
source and always watch the DOM tree.
On Fri, Jul 31, 2020 at 19:29 Denys Vlasenko
wrote:
> On Fri, Jul 10, 2020 at 9:50 PM Sergey Ponomarev
>
the colors I selected because they are shorter and simpler. We may keep hex
colors instead
On Fri, 31 Jul 2020 at 19:25, Denys Vlasenko
wrote:
> On Fri, Jul 10, 2020 at 9:50 PM Sergey Ponomarev
> wrote:
> > Divide table to thead, tbody and tfoot as it should be in DOM.
> > A
This is an old topic where Pascal proposed a patch that allows to run a
script to list the directory with httpd
http://hg.slitaz.org/wok/raw-file/3dc7c4a7f5ef/busybox/stuff/busybox-1.18-httpd.u
Denys said:
> This is already supported:
> * If directory URL is given, no index.html is found
Nobody sees them, source code is here, resulted DOM can be seen in web inspector
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index
Remove new lines \n and some semicolons ;. This minimize page style size from
655 to 604
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 74 ++---
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/networking/httpd_indexcgi.c b
The httpd_indexcgi can generate more compact and proper HTML.
Sergey Ponomarev (5):
httpd_indexcgi.c: minimize style CSS
httpd_indexcgi.c: use CSS for odd/even rows
httpd_indexcgi.c: Simplify CSS
httpd_indexcgi.c: Remove new lines in HTML
httpd_indexcgi.c: Simplify columns CSS style
Colgroup is used only to group/merge columns and not needed here.
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index 8978a9c1a
Divide table to thead, tbody and tfoot as it should be in DOM.
Add row hover style.
Use short color names.
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/networking/httpd_indexcgi.c b
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index f5f18959d..a94d4983e 100644
--- a/networking/httpd_indexcgi.c
+++ b/networking
.
But the logic is not implemented yes so this makes even worse and more
resources are spent:
browsers always invalidates their cache, date is formatted for each response
and transmitted over networks twice.
This set of patches implements caching in most simplest and fastest way.
Sergey Ponomarev (4
-by: Sergey Ponomarev
---
networking/httpd.c | 49 +++---
1 file changed, 46 insertions(+), 3 deletions(-)
diff --git a/networking/httpd.c b/networking/httpd.c
index 97b61fb77..50a837229 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -214,6 +214,14
The ETag header was introduced in HTTP v1.1 in 1999 year. Chrome not send the
If-None-Match header if server uses old HTTP/1.0 protocol.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/networking
the last mod date can be passed via ETag header as a raw unix timestamp.
This simplifies logic and the only downside is that in JavaScript the
document.lastModified will return null which is not a big deal.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 11 +++
1 file changed, 3
of cache aging and it makes sense only for generated content. We can
use ETag instead.
In the same time the Date eats power, CPU and network resources which are
critical for embedded systems.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 6 +-
1 file changed, 1 insertion(+), 5
t;hex(last_mod)-hex(file_size)" e.g. "5e132e20-417" (with quotes).
That means that it's not completely reliable as hash functions but fair enough.
The same form of ETag is used by Nginx so load balancing of static content is
safe.
Signed-off-by: Sergey Ponomarev
---
net
walled systems.
> They would loose the ability to set their time.
> http://www.vervest.org/htp/
>
--
Sergey Ponomarev <https://linkedin.com/in/stokito>, skype:stokito
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
od) {
> > + send_headers_and_exit(HTTP_NOT_MODIFIED);
> > + log_and_exit();
>
> Here this log_and_exit() is redundant. It is already called from
> send_headers_and_exit().
>
> Cheers,
>
> Xabier Oneca_,,_
>
--
Sergey Ponomarev <ht
The If-None-Match header many have multiple ETags
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26
Even if httpd returns a single ETag clients may want to send few of them.
Since ETags are always quoted the easiest way to check is just to check a
substring.
Signed-off-by: Sergey
it configurable:
Subject: [PATCH] httpd: Make Deny/Allow by IP config support optional
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/networking/httpd.c b/networking/httpd.c
index 0297cf9ec..7ddf6caaa
. If-Modified-Since
2 Jan but Last-Modified is 1 Jan.
Since we don't make an actual date comparison then server will send 200 while
it might send 304.
But such cases will never occur with usual browser and while this case is
supported by spec we can ignore it.
Signed-off-by: Sergey Ponomarev
It doesn't make sense to check If-Modified-Since if If-None-Match has a value
but wasn't matched.
https://tools.ietf.org/html/rfc7232#section-3.3
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 29 ++---
1 file changed, 18 insertions(+), 11 deletions(-)
diff
It's better to return header names in proper case because they may be
improperly parsed on client's side e.g. it may be some case sensitive
comparison in some shell script.
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions
The date_str variable used for formatting both Date and Last-Modified headers.
Now it only used for Date header and Last-Modified is stored in
globals.last_mod_date near to ETag
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 23 +--
1 file changed, 17 insertions
headers:
* Content-Type
* Accept-Ranges: bytes
* Last-Modified
* ETag
All those headers will be stored by client and in browsers JavaScript will
anyway return correct document.lastModified and document.contentType
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 60
The $RANDOM variable may be disabled on ash compilation but we can safelly use
mktemp instead.
Signed-off-by: Sergey Ponomarev
---
networking/httpd_post_upload.cgi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networking/httpd_post_upload.cgi b/networking
8080 -h "$WWW_DIR"
echo 'curl will return 304 Not Modified with ETag: "5fee6600-4f":'
curl -s -I 'http://localhost:8080/last-mod.html' \
--header 'If-None-Match: "5fee6600-4f"' \
--header 'If-Modified-Since: Fri, 01 Jan 2021 00:00:00 GMT'
The two last commits
anuary 18, 2021, Sergey Ponomarev wrote:
> > Introduce a separate option FTPS_SUPPORTED instead of not obvious
> ENABLE_FEATURE_WGET_HTTPS.
> >
>
> I juat wonder...
> If you are bothered to add FTP configure option, how about making FTPS
> separate from HTTPS a
--
(add/remove: 0/7 grow/shrink: 0/3 up/down: 0/-1256) Total: -1256 bytes
Signed-off-by: Sergey Ponomarev
---
networking/wget.c | 43 ---
1 file changed, 32 insertions(+), 11 deletions(-)
diff --git a/networking/wget.c b/networking/wget.c
index
't contain any newline symbol.
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 36 +++--
networking/httpd_ssi.c | 46 +++--
2 files changed, 73 insertions(+), 9 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 12
networking/httpd_ssi.c | 4 ++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index 53d316d05..34429e9c5 100644
--- a/networking
the first row after header
white.
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 39 ++---
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index 34429e9c5..548f982ef
ot; header.
But it will be better to include the directly into
generated HTML so we won't be lost it when HTML file is saved on disk.
Signed-off-by: Sergey Ponomarev
---
networking/httpd_indexcgi.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/
and telnet may do need to make the lookup.
I.e. they are clients which don't know for sure which port must be used.
Signed-off-by: Sergey Ponomarev
---
include/libbb.h | 5 -
libbb/Config.src | 12
networking/isrv_identd.c | 3 +--
networking/telnet.c | 3
l: 8 bytes
textdata bss dec hex filename
1869364027 69256 260219 3f87b busybox_old
1869444027 69256 260227 3f883 busybox_unstripped
Signed-off-by: Sergey Ponomarev
---
networking/httpd.c | 31 ++-
networking/telnetd.c | 16 +
is always zero we may remove the param
Signed-off-by: Sergey Ponomarev
---
include/libbb.h| 9 +++--
libbb/xconnect.c | 11 +++
networking/nc.c| 4 ++--
networking/nc_bloaty.c | 6 ++
networking/tcpudp.c| 2 +-
networking/telnet.c| 2 +-
6 files
() is still used for nc and tcpudp because there we
do expect port names.
Signed-off-by: Sergey Ponomarev
---
networking/ftpgetput.c | 3 ++-
networking/tftp.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 30b3dabd1
Just do not select FEATURE_ETC_SERVICES.
>
> On Wed, Aug 25, 2021 at 10:14 PM Sergey Ponomarev wrote:
> >
> > Don't lookup /etc/services for well known ports.
> > In the commit was added a new function bb_lookup_std_port().
> > The function is in fact not needed
Vlasenko wrote:
>
> On Wed, Aug 25, 2021 at 10:15 PM Sergey Ponomarev wrote:
> > The bb_lookup_port() function may resolve port by its name.
> > But for FTP or TFTP no any names are expected because they work only with
> > one protocol.
> > E.g. it doesn't make any s
("bad local port '%s'", str_p);
Also passing a zero port into xhost2sockaddr() will also make process die
On Thu, 9 Sept 2021 at 23:03, Denys Vlasenko wrote:
>
> On Wed, Aug 25, 2021 at 10:15 PM Sergey Ponomarev wrote:
> > Unlike xatou16() the bb_lookup_port() won't e
ant. I've never used sed that
> much but awk is a tool I use a lot; that's why I rewrote the one-liner
> that way. You may have to get a newer version of BusyBox.
>
> Doug Clapp
>
> ___
> busybox mailing list
> busybox@busybox.ne
uld guide me with this problem,
>
> Regards,
> Sukreet
> ___
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
--
Sergey Ponomarev, skype:stokito
__
--
(add/remove: 0/0 grow/shrink: 8/0 up/down: 159/0) Total: 159 bytes
textdata bss dec hex filename
16408837471688 169523 29633 busybox_old
16424737471688 169682 296d2 busybox_unstripped
Signed-off-by: Sergey Ponomarev
dec hex filename
17745239711688 183111 2cb47 busybox_old
17752339711688 183182 2cb8e busybox_unstripped
Signed-off-by: Sergey Ponomarev
---
networking/wget.c | 22 +++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/networking/wget
Total: 31 bytes
text data bss dec hex filename
177416 3971 1688 183075 2cb23 busybox_old
177447 3971 1688 183106 2cb42 busybox_unstripped
Signed-off-by: Sergey Ponomarev
---
networking/wget.c | 15 +--
1 file changed, 13 insertions(+), 2 d
52 matches
Mail list logo