summaryrefslogtreecommitdiff
path: root/nanohttp.c
Commit message (Collapse)AuthorAgeFilesLines
* Stop calling xmlMemoryDumpNick Wellnhofer2023-04-301-1/+0
| | | | | | This was used to check for memory leaks but could potentially create a .memdump file. These days, there are better ways to check for memory leaks.
* sources: Silence C4013 warnings on Visual StudioChun-wei Fan2022-11-221-0/+2
| | | | | | | | The read(), close(), open(), lseek() functions are found in io.h on Visual Studio, which does not ship unistd.h, so include io.h on Windows if unistd.h is not found. C4013 (aka implicit declaration of ...) warnings can often ring alarm bells.
* Bypass proxy in nanoHTTP for hosts in "no_proxy"Markus Jörg2022-11-041-4/+108
|
* http: Simplify IPv6 checksNick Wellnhofer2022-09-051-43/+5
| | | | | This should also enable IPv6 support on Windows. Untested and mostly useless anyway, since we don't support HTTPS.
* Remove arg cast configure checksNick Wellnhofer2022-09-041-0/+3
| | | | We can simply cast to non-const char * unconditionally.
* Remove BeOS supportNick Wellnhofer2022-09-041-18/+0
| | | | Haiku shouldn't be affected.
* Remove unused code in nanohttp.cNick Wellnhofer2022-09-021-15/+0
| | | | This was hidden behind an undocumented flag RES_USE_INET6.
* Stop including sys/types.hNick Wellnhofer2022-09-021-3/+0
|
* Don't use sizeof(xmlChar) or sizeof(char)Nick Wellnhofer2022-09-011-1/+1
|
* Consolidate private header filesNick Wellnhofer2022-08-261-0/+3
| | | | | | | | | | | Private functions were previously declared - in header files in the root directory - in public headers guarded with IN_LIBXML - in libxml.h - redundantly in source files that used them. Consolidate all private header files in include/private.
* Don't check for standard C89 headersNick Wellnhofer2022-03-021-9/+2
| | | | | | | | | | | | | | | | | | | | Don't check for - ctype.h - errno.h - float.h - limits.h - math.h - signal.h - stdarg.h - stdlib.h - string.h - time.h Stop including non-standard headers - malloc.h - strings.h
* Remove useless __CYGWIN__ checksNick Wellnhofer2022-02-281-1/+1
| | | | | | | | | | From what I can tell, some really early Cygwin versions from around 1998-2000 used to erroneously define _WIN32. This was eventually fixed, but these days, the `defined(_WIN32) && !defined(__CYGWIN__)` idiom is unnecessary. Now, we only check for __CYGWIN__ in xmlexports.h when deciding whether to use __declspec.
* Remove elfgcchack.hNick Wellnhofer2022-02-201-2/+0
| | | | | The same optimization can be enabled with -fno-semantic-interposition since GCC 5. clang has always used this option by default.
* Fix typosNick Wellnhofer2020-03-081-7/+7
| | | | Resolves #133.
* Large batch of typo fixesJared Yanovich2019-09-301-2/+2
| | | | Closes #109.
* Fix libz and liblzma detectionNick Wellnhofer2017-11-271-8/+8
| | | | | | | | | If libz or liblzma are detected with pkg-config, AC_CHECK_HEADERS must not be run because the correct CPPFLAGS aren't set. It is actually not required have separate checks for LIBXML_ZLIB_ENABLED and HAVE_ZLIB_H. Only check for LIBXML_ZLIB_ENABLED and remove HAVE_ZLIB_H macro. Fixes bug 764657, bug 787041.
* Fix pointer comparison warnings on 64-bit WindowsJ. Peter Mugaas2017-10-211-2/+2
|
* Fix unused variable warnings in nanohttp.cNick Wellnhofer2017-10-091-3/+4
| | | | | Some variables are only used if certain macros are set. Move the declarations around.
* Fix the Windows header messNick Wellnhofer2017-10-091-6/+1
| | | | | | | | | | | | Don't include windows.h and wsockcompat.h from config.h but only when needed. Don't define _WINSOCKAPI_ manually. This was apparently done to stop windows.h from including winsock.h which is a problem if winsock2.h wasn't included first. But on MinGW, this causes compiler warnings. Define WIN32_LEAN_AND_MEAN instead which has the same effect. Always use the compiler-defined _WIN32 macro instead of WIN32.
* socklen_t is always int on WindowsNick Wellnhofer2017-10-091-2/+0
| | | | | Define XML_SOCKLEN_T as `int` unconditionally in wsockcompat.h. Fixes compiler warnings and removes some duplicated code.
* Don't redefine socket error codes on WindowsNick Wellnhofer2017-10-091-2/+16
| | | | | | | Translate WSA error codes instead of blindly redefining POSIX error codes on Windows. The redefinitions caused warnings in modern Windows environments, but simply ifdef'ing out the redefinitions seems like the wrong approach.
* Change preprocessor OS tests to __linux__Nick Wellnhofer2017-09-141-1/+1
| | | | "linux" without leading underscores is deprecated and less reliable.
* Fix empty-body warning in nanohttp.cNick Wellnhofer2017-06-171-1/+2
|
* Increase buffer space for port in HTTP redirect supportDaniel Veillard2017-04-071-2/+2
| | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=780690 nanohttp.c: the code wrongly assumed a short int port value.
* Fix various Missing Null checksGaurav Gupta2014-07-141-6/+6
| | | | For https://bugzilla.gnome.org/show_bug.cgi?id=732823
* Use specific macros for portability to OS/400Patrick Monnerat2013-12-121-2/+2
| | | | | Some of the entry points for POSIX networking calls in OS/400 differs slightly due to not using const arguments
* run close socket on Solaris, same as we do on other platformsDenis Pauk2013-09-301-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=705188
* xmlCtxtReadFile doesn't work with literal IPv6 URLsSteve Wolf2013-02-281-1/+11
| | | | | | | | | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=694185 RedHat Bug 624626 discusses the new behavior of libxml regarding brackets around IPv6 addresses. In earlier versions such as 2.6.27, uri.c stripped the brackets (e.g. uri->server == "fdf2:1e39:73d1:934e::119"); in the current version it returns IPv6 addresses with brackets intact (e.g. uri->server == "[fdf2:1e39:73d1:934e::119]"). Thus in 2.9.0, xmlCtxtReadFile() has a problem when it is passed a URL containing a literal IPv6 address. xmlCtxReadFile() and its subroutines pass uri->server unchanged to getaddrinfo(), which doesn't recognize a bracketed IPv6 address, so the read fails. This strips the [ and ] from IPv6 addresses allowing getaddrinfo() to work properly with such URIs.
* Big space and tab cleanupDaniel Veillard2012-09-111-26/+26
| | | | Remove all space before tabs and space and tabs at end of lines.
* Remove redundant and ungarded include of resolv.hDaniel Veillard2012-05-111-3/+0
| | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=617053 This broke the build on Interix-6.0
* Fix portability failure if netdb.h lacks NO_ADDRESSDaniel Veillard2012-04-021-0/+2
|
* Remove two references to u_shortDaniel Veillard2012-04-021-1/+1
|
* various: handle return values of write callsStefan Kost2011-05-211-6/+12
|
* 614087 Fix Socket API usage to allow Windows64 compilationOzkan Sezer2010-11-041-34/+33
| | | | | | | In Windows 64 a socket is no more represented by an int, this breaks the nanoftp API and nanoftp/nanohttp, the patch changes this and fix the API for Win64 Regenerated the XML and documentation as a result too.
* 598785 Fix nanohttp on Windowsspadix2009-10-191-0/+6
| | | | | * nanohttp.c: the check for socket comparing to FD_SETSIZE introduced in bug fix for 559501 breaks on WinSockAPI
* Chasing dead assignments reported by clang-scanDaniel Veillard2009-09-071-4/+1
| | | | | | | | * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
* Fix a bunch of scan 'dead increments' and cleanupDaniel Veillard2009-09-051-0/+2
| | | | | | | | * HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c: fix unused variables, or unneeded increments as well as a couple of space issues * runtest.c: check for NULL before calling unlink()
* 559501 avoid select and use poll for nanohttpRaphael Prevost2009-08-231-175/+237
| | | | | | * config.h.in configure.in: detect availability of poll() and poll.h * nanohttp.c: switch to use poll instead of select() when possible to avoid out of fd set memory errors on very large fds
* a couple more fixes patch from Andreas Färber to compile on HaikuDaniel Veillard2008-08-291-2/+2
| | | | | | | | | * parser.c: a couple more fixes * nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku * doc/examples/*: regenerated daniel svn path=/trunk/; revision=3784
* added space for port number (when not 80) in xmlNanoHTTPMethodRedir, plusWilliam M. Brack2008-02-061-0/+10
| | | | | | | | * nanohttp.c: added space for port number (when not 80) in xmlNanoHTTPMethodRedir, plus a few more comments. Should fix #514521. svn path=/trunk/; revision=3685
* Enhanced to include port number (if not == 80) on the "Header:" URL (bugWilliam M. Brack2007-08-241-1/+6
| | | | | | | | * nanohttp.c: Enhanced to include port number (if not == 80) on the "Header:" URL (bug #469681). * xmlregexp.c: Fixed a typo causing a warning message. svn path=/trunk/; revision=3657
* fix an open() call with creation without 3rd argument hopefully thatDaniel Veillard2007-08-231-1/+1
| | | | | | | | * nanohttp.c: fix an open() call with creation without 3rd argument hopefully that interface is never used. Daniel svn path=/trunk/; revision=3656
* small enhancement to last fix, pointed out by Alex CornejoWilliam M. Brack2007-05-161-2/+3
| | | | | | | * nanohttp.c: small enhancement to last fix, pointed out by Alex Cornejo svn path=/trunk/; revision=3617
* fixed problem on gzip streams (bug #438045) fixed minor spot of redundantWilliam M. Brack2007-05-151-3/+5
| | | | | | | * nanohttp.c: fixed problem on gzip streams (bug #438045) * xpath.c: fixed minor spot of redundant code - no logic change. svn path=/trunk/; revision=3616
* applied patch from Andreas Stricke to ease the compilation on Windows CEDaniel Veillard2007-04-171-2/+1
| | | | | | | | | * catalog.c libxml.h win32/wince/wincecompat.h win32/wince/wincecompat.c xmlIO.c nanohttp.c nanoftp.c trio.c triostr.c triostr.h: applied patch from Andreas Stricke to ease the compilation on Windows CE Daniel svn path=/trunk/; revision=3600
* applied patch from Gary Coady to accept gzipped http resources. DanielDaniel Veillard2005-12-151-3/+69
| | | | | | * nanohttp.c: applied patch from Gary Coady to accept gzipped http resources. Daniel
* applied patch from Kolja Nowak to use getaddrinfo() if supported inRob Richards2005-10-131-29/+41
| | | | | * nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak to use getaddrinfo() if supported in Windows build (bug# 317431).
* applied patch from Marcus Boerger to remove warnings on Windows. DanielDaniel Veillard2005-08-081-2/+23
| | | | | | * nanoftp.c nanohttp.c xmlschemastypes.c: applied patch from Marcus Boerger to remove warnings on Windows. Daniel
* get rid of the dependancy on a locally installed DTD try to cleanup theDaniel Veillard2005-08-071-2/+2
| | | | | | | | | | | * test/relaxng/docbook_0.xml: get rid of the dependancy on a locally installed DTD * uri.c include/libxml/uri.h xmlIO.c nanoftp.c nanohttp.c: try to cleanup the Path/URI conversion mess, needed fixing in various layers and a new API to the uri module which also fixes #306861 * runtest.c: integrated a regression test specific to check the URI conversions done before calling the I/O handlers. Daniel
* fixed bug #310105 with http_proxy environments with patch provided byDaniel Veillard2005-07-121-1/+3
| | | | | | * nanohttp.c: fixed bug #310105 with http_proxy environments with patch provided by Peter Breitenlohner Daniel