Simon Goldschmidt
7859c6832b
makefsdata: fix compiling for win32
2018-11-23 12:59:07 +01:00
Dirk Ziegelmeier
b1fbb5ad45
Fix warnings about ignored return values in makefsdata.c
...
These only show up when compiling with -O3
2018-11-22 21:53:12 +01:00
Dirk Ziegelmeier
30b2d07362
Fix compile error with GCC 8 in makefsdata
...
lwip/lwip/src/apps/http/makefsdata/makefsdata.c:929:56: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
snprintf(qualifiedName, sizeof(qualifiedName), "%s/%s", curSubdir, filename);
/home/dziegel/lwip/lwip/src/apps/http/makefsdata/makefsdata.c:929:3: note: ‘snprintf’ output 2 or more bytes (assuming 257) into a destination of size 256
snprintf(qualifiedName, sizeof(qualifiedName), "%s/%s", curSubdir, filename);
Reduce subdir string length by 3 bytes to make the warning go away. The whole file path including directory AND filename is limited to MAX_PATH_LEN - so it is reasonable to reserve 3 bytes less for directory - the filename won't fit anyway in the remaining 3 bytes.
2018-11-20 20:34:29 +01:00
Simon Goldschmidt
ff8d1a384f
httpd: SSI types should be overridable (task #15071 )
...
Add define LWIP_HTTPD_SSI_EXTENSIONS to make the extension list
overridable, clarify documentation of LWIP_HTTPD_SSI_BY_FILE_EXTENSION
a bit.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-10-23 08:17:45 +02:00
Simon Goldschmidt
f6b728b24c
makefsdata: obey LWIP_HTTPD_SSI_BY_FILE_EXTENSION
...
Don't check SSI extension list if LWIP_HTTPD_SSI_BY_FILE_EXTENSION == 0
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-10-23 08:16:49 +02:00
Simon Goldschmidt
688b0935e2
Try to catch missing std includes on travis
...
By defining LWIP_PLATFORM_ASSERT to a function, we can prevent arch.h
from including stdio.h and stdlib.h
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-10-23 08:00:37 +02:00
Simon Goldschmidt
ef02b1dc20
fix missing standard includes
...
These were a problem only if arch.h does not include them.
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-10-23 07:46:13 +02:00
Dirk Ziegelmeier
06cc825431
Whitespace cleanup lwIP
2018-10-22 20:53:58 +02:00
Simon Goldschmidt
a044c807f8
altcp_tls: rename altcp_tls_new -> altcp_tls_wrap, add altcp_tls_new
...
The new altcp_tls_new() is a type safe version of altcp_tls_alloc()
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-09-24 22:29:54 +02:00
Dirk Ziegelmeier
796f98beb2
Fix no newline at end of http_client.c
2018-09-12 22:41:07 +02:00
Dirk Ziegelmeier
cdfa3dfa9d
http_client.c: Fix compile when TCP is disabled
2018-09-12 08:27:43 +02:00
Dirk Ziegelmeier
257dc1d6fd
Fix doxygen warnings in altcp_proxyconnect.c
2018-09-10 13:30:50 +02:00
Simon Goldschmidt
0610b34372
httpd: fixed duplicate NULL check
...
See bug #54196 .
Reported-by: Andrey Vinogradov <andrey.vinogradov@teplomonitor.ru>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
2018-06-27 20:53:30 +02:00
Axel Lin
a56e61c942
Fix compiling with LWIP_NOASSERT defined
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-06-24 18:18:35 +08:00
Simon Goldschmidt
d80e84864e
httpd deduplicate code in http_send_data_ssi
...
Keep lead-in/lead-out tag in an array
2018-06-22 22:23:26 +02:00
Lucas Vinicius Hartmann
0acf37fd75
Added JavaScript-friendly ssi /*#tag*/.
2018-06-22 22:06:14 +02:00
Simon Goldschmidt
9992b48e90
fix compiling with LWIP_NOASSERT defined
...
See bug #54157
2018-06-20 20:56:20 +02:00
Simon Goldschmidt
eb91fdd861
httpd: fix missing null termination when searching for a default file in file system folder
2018-06-12 20:14:04 +02:00
goldsimon
a445172661
makefsdata: fix hiding local variable 'i'
2018-05-02 10:05:24 +02:00
goldsimon
4cc953d0e3
httpd: fixed compiling makefsdata.c
2018-04-04 21:45:47 +02:00
Giuseppe Modugno
2d4da92eeb
makefsdata: added options to skip and avoid compressing some extensions
...
See patch #9605
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-04-03 21:08:25 +02:00
goldsimon
c974fc9d43
http_client: fix compiling if mem_size_t is smaller than size_t
2018-03-21 09:33:00 +01:00
Axel Lin
600527dde7
apps/http: httpd: Fix unused parameter warning if !LWIP_HTTPD_SUPPORT_V09
...
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-03-21 15:05:33 +08:00
Axel Lin
e19d908f0e
apps/http: Fix httpd_structs.h build error
...
Fixes: bug #53382 : HTTPD_ADDITIONAL_CONTENT_TYPES doesn't compile
Reported-by: Giuseppe Modugno <giuseppe.modugno.loqed@gmail.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
2018-03-19 21:08:17 +08:00
goldsimon
253fcc8dcd
http_client: call tcp_recved for header bytes
...
Without this, closing the connection after successful transfer resulted
in a RST being sent because the window was not fully marked as 'recved'.
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-03-09 11:30:23 +01:00
goldsimon
61a1b98cc9
various IPv6-only compile fixes
2018-03-07 20:55:00 +01:00
goldsimon
b6d9bb6b2a
http_client: check current state when receiving FIN
2018-03-06 21:51:13 +01:00
goldsimon
0ee0393936
fix compiling http_client and altcp_proxyconnect with gcc
2018-02-22 09:12:51 +01:00
goldsimon
7b9e145fc5
http_client: change user-agent and make it overridable
2018-02-21 20:18:29 +01:00
goldsimon
2753eb1fb1
add an altcp layer for http proxy connect (e.g. to tunnel TLS through a http proxy)
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-02-21 20:18:05 +01:00
goldsimon
a0e900dd02
makefsdata: update usage output to code
2018-02-21 14:42:47 +01:00
goldsimon
842b9f4429
altcp: simplify creating different types by adding an allocator concept
...
This is done with an example in the http_client
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-02-19 21:41:48 +01:00
Dirk Ziegelmeier
5b33d33e34
Add HTTP client to documentation
2018-02-19 09:01:44 +01:00
goldsimon
ef29f2d401
http_client: httpc_tcp_recv did not return inner_conn's recv return value
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
Reported-by: Our Air Quality <info@ourairquality.org>
2018-02-18 09:02:00 +01:00
goldsimon
bd656efd64
http client: add https support, fix parsing header with chained pbufs
2018-02-16 12:29:40 +01:00
goldsimon
e87392cc85
http client: fix proxy support
2018-02-16 09:18:35 +01:00
goldsimon
3dafa72ec8
apps: add http client
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-02-15 22:10:29 +01:00
goldsimon
d4c4b0eec5
rename folder 'src/apps/httpd' to 'http'
...
Signed-off-by: goldsimon <goldsimon@gmx.de>
2018-02-15 20:13:25 +01:00