Commit Graph

67 Commits

Author SHA1 Message Date
Eric Pooch 9a5b3d8918 Support for Macintosh System 1.1 on 128K Macintosh
This port of lwip adds support for 128K Macintosh
with the original 64K ROMs running System 1.1 or
later.
Modem port must be connected to a server running pppd
at 9600 baud.
2018-03-12 21:40:46 -07:00
goldsimon 28fe0060d9 httpd:
- separated content-types from other header fields to make it easier to add more content types (no manual indexing required);
- added content-type for pdf, fixed content-type for javascript (no "x-");
2014-12-17 10:40:16 +01:00
goldsimon 4023aedb3a httpd:
- fix maximum write count for LWIP_HTTPD_DYNAMIC_FILE_READ==1 (was limited to 2*mss);
- fix waiting for ACK from remote side after sending headers of async read files;
- pass TCP_WRITE_FLAG_MORE when writing headers
2014-12-17 10:18:13 +01:00
goldsimon 3aec30b2a7 httpd: fixed compiling HTTPD_USE_MEM_POOL in strict C (not C++) 2014-11-12 12:49:54 +01:00
goldsimon cd15306868 httpd: fixed skipping bytes in dynamic header under certain memory constraints 2014-09-19 13:11:45 +02:00
goldsimon 878b4dbc52 fixed a 'use after free' found from scanning the our httpd with a webserver scanning tool 2014-09-01 17:09:07 +02:00
goldsimon 912f37d66b httpd: fixed compiling in 2 configurations when SSI is disabled 2014-09-01 16:44:34 +02:00
Simon Goldschmidt 47ab4b0f98 httpd: fix memory leak when LWIP_HTTPD_SUPPORT_REQUESTLIST==1 and connection is closed while trying to parse a request (should not happen on correct connections) 2014-08-20 21:47:29 +02:00
goldsimon 0007b4e6ba Multiple fixes found by coverity scan 2014-04-30 12:25:40 +02:00
Simon Goldschmidt bc4a7f92ad httpd: fix that http_write() returns 1 in "length" when not sending because of sndbuf/sndqueuelen 2014-03-11 20:44:06 +01:00
Simon Goldschmidt 16167a22ef Fixed bug #31948 httpd: Improving HTTP Server performance when SSI is enabled 2014-03-11 20:34:37 +01:00
Simon Goldschmidt 21e076cb56 patch #8097 httpd: Return failure if parsing Content-Length fails 2014-02-20 21:19:27 +01:00
Fatih Asici b7b6373ca5 httpd: Ignore remaining POST content in case of application error 2014-01-17 22:07:42 +01:00
Simon Goldschmidt f9147eb997 bug #37151 HTTP header corrupted in http_post_request 2012-08-22 22:21:35 +02:00
Simon Goldschmidt 6f002beae5 httpd: don't shadow globals ('abort' is declared under linux) 2012-02-23 19:01:05 +01:00
Simon Goldschmidt 3af14514dd httpd: use better default values: support HTTP request in up to 5 pbufs by default 2012-02-22 20:56:45 +01:00
Simon Goldschmidt 59c83ef10e httpd: ensure tcp_write() isn't called with len==0 2012-02-22 20:55:27 +01:00
goldsimon 8eb51799aa httpd:
- include 'struct fs_file' in 'struct http_state' to prevent file allocation fails when connection allocation succeeded (plus have less allocations/pools);
- added (conditional) code to abort the oldest connection when allocating a new connection fails;
- fixed some warnings;
2012-02-16 15:39:15 +01:00
Simon Goldschmidt 49fcad8f65 Fixed warning about unused http_continue() 2012-02-14 21:25:06 +01:00
goldsimon 5ab0be592b Prevent multiple calls to httpd_post_finished, since it might have already been called before from httpd_post_data_recved(). 2012-01-12 15:45:27 +01:00
Simon Goldschmidt d1bf1ee0da httpd + makefsdata:
- added delayed open/read functionality (so that SSI code can delay sending of a file until internal data is available);
- clean up fs-handling: additional read is not required with our current fs implementation;
- kill oldest connection when running out of http_state memory;
- splitted SSI state into its own struct so that non-SSI pages don't consume too much memory (SSI buffer can get quit big);
- added support for HTTP/1.1 persistent connections (use the '-11' switch of makefsdata; not available for SSI files since we cannot calculate the file length in advance);
- splitted the unreadably-long function http_send_data into multiple smaller functions;
2011-09-04 19:26:46 +02:00
Simon Goldschmidt 7413328273 Fix that connections are closed with RST if the HTTP requests didn't fit into the first packet (RST would be sent because not all data has been recved by the httpd - now we ensure all data has been read by waiting for the first double-CRLF before parsing the request) 2011-09-02 22:02:45 +02:00
goldsimon 32b341c04a Fix compiler warnings in debug macros 2011-07-06 08:37:01 +00:00
goldsimon b73187713f httpd: move some variables from rwdata- to rodata- or bss-section 2011-03-27 13:07:48 +00:00
kieranm c67a905dd9 Fix compile error in httpd.c 2011-02-03 12:44:15 +00:00
goldsimon 61cd545508 Improved debug output on sending data 2010-11-20 17:29:35 +00:00
goldsimon a679e2aec6 - strip '?' from all uris before passing them to fs_open;
- http_close_conn must handle hs==NULL correctly (when called from http_poll);
- added LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR to call tcp_abort when tcp_close fails with out-of-memory error;
- httpd_init checks if the memp pool MEMP_HTTPD_STATE is big enough if HTTPD_USE_MEM_POOL==1
2010-07-19 14:26:36 +00:00
goldsimon c0b51ff573 Fixed HTTP header for 400 (Bad Request) and 501 (Not Implemented) 2010-07-07 08:17:12 +00:00
goldsimon 5afec09b38 Fixed compilation for LWIP_HTTPD_POST_MANUAL_WND==0 2010-07-06 20:24:36 +00:00
goldsimon 19de161358 - added LWIP_HTTPD_SSI_INCLUDE_TAG (default on): when off, don't include the SSI tag in the output sent to clients (so SSI tags can be used anywhere, even in input boxes);
- fixed copy/nocopy for SSI files;
- added LWIP_HTTPD_SSI_MULTIPART (default off): when on, SSI functions have one more argument that is used as state for an SSI tag to return more than LWIP_HTTPD_MAX_TAG_INSERT_LEN bytes (the handler function is then called multiple times);
- added LWIP_HTTPD_POST_MANUAL_WND (default off): when on, post callbacks can throttle RX speed by manually sending window updates (i.e. tcp_recved is called manually by calling httpd_post_data_recved);
- added LWIP_HTTPD_FILE_STATE (default off): when on, fs_open/fs_close call application defined functions fs_state_init/fs_state_free (fs_state_init returns a void pointer that is passed to every call to an SSI handler);
- compacted the code a bit by moving the code that calls tcp_write() in a loop to its own function;
- error files may have the extension shtml, too;
- fixed that returning default 404 page did not work any more;
2010-07-05 14:32:24 +00:00
goldsimon c7acce523a fixed signed/unsigned comparision, fixed indentation 2010-05-17 12:19:42 +00:00
goldsimon 3a06d130c3 performance improvements:
- don't stop sending after inserting a tag (leads to delayed ACKs);
- enqueue FIN in last data packet;
fix usage of tcp_close() after correcting close vs. shutdown
2010-05-17 11:20:59 +00:00
goldsimon debf0134df Fixed compilation for LWIP_HTTPD_DYNAMIC_HEADERS==1, fixed a few warnings, changed the init code a bit 2010-05-16 16:18:39 +00:00
goldsimon 57c1f7a16d Fixed compilation with LWIP_UDP/LWIP_TCP disabled 2010-03-26 16:10:32 +00:00
goldsimon c2f3fcc72a Set LWIP_HTTPD_STRNSTR_PRIVATE on by default, prevent old-style function declaration 2010-03-26 14:16:04 +00:00
goldsimon fbee0f5c56 Don't limit maximum body length in post, added TRACE to some debug outputs 2010-03-26 13:42:37 +00:00
goldsimon 321578fd14 Fixed compilation: removed extra tokens after #endif, which MSVC doesn't complain about :-( 2010-03-25 10:32:12 +00:00
goldsimon 71b0d509dc minor coding style: strnstr: added brackets 2010-03-22 15:48:23 +00:00
goldsimon 7ea6692cdb Don't call tcp_close right after all data is enqueue, since this may result in resetting the connection (because of task #10088) 2010-03-22 12:26:40 +00:00
goldsimon 75d9fdc5c7 Initialize the listen pcb's prio correctly, added missing cast and include, http_poll: don't check for pcb->state 2010-03-22 10:07:36 +00:00
goldsimon 0035c0f119 Added support for POST, HTTP/0.9 and extended status files (e.g. "/501.html") 2010-03-21 15:42:59 +00:00
goldsimon 298991e83b Added option LWIP_HTTPD_SUPPORT_EXTSTATUS 2010-03-20 13:50:26 +00:00
goldsimon f779310da6 Support request that are spanned over multiple packets/pbufs (disabled by default to save space), use memcpy instead of snprintf 2010-03-20 13:35:53 +00:00
goldsimon 111004caa9 Fixed compilation for CGI, SSI and DYNAMIC_HEADERS, renamed variables, added comments 2010-03-18 06:31:18 +00:00
goldsimon 3a30b8350d Use tcp_mss(pcb) instead of pcb->mss; only call tcp_output from http_poll 2010-03-13 15:02:22 +00:00
goldsimon 3f79779a0f Added connection timing, changed default definition of HTTP_IS_DATA_VOLATILE() to not copy data when sending from unmodified files 2010-03-12 19:26:57 +00:00
goldsimon b83a115953 Fixed compilation warnings (missing casts, includes, etc.) 2010-03-10 11:27:11 +00:00
goldsimon e97f6e1909 Improved code size & memory footprint when LWIP_HTTPD_SSI==0 && LWIP_HTTPD_DYNAMIC_HEADERS==0 2010-03-08 18:58:21 +00:00
goldsimon 6bb0cded4f For LWIP_HTTPD_DYNAMIC_HEADERS==1, skip get_http_headers() if http_header_included 2010-02-24 11:51:05 +00:00
goldsimon 0b541d8f0a HTTPD_DEBUG defaults to off 2010-02-20 17:48:43 +00:00