summaryrefslogtreecommitdiff
path: root/libproxy/test
Commit message (Collapse)AuthorAgeFilesLines
* Small performance improvementsAlbert Astals Cid2019-10-042-2/+2
| | | | | * pass strings by const & instead of copy * Search single chars as chars and not as strings
* get-pac-test: Fix build with clang/libc++Khem Raj2019-01-301-1/+1
| | | | | | | get-pac-test.cpp:55:10: error: assigning to 'int' from incompatible type '__bind<int &, sockaddr *, unsigned int>' ret = bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Khem Raj <raj.khem@gmail.com>
* get-pac-test: Fix typoDavid King2017-07-241-1/+1
| | | | Closes: #64
* Merge branch 'master' into masterJeremy Linton2017-04-261-5/+45
|\
| * get-pac-test: Fix overflow testDavid King2017-01-091-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Rather than checking for EBADF when the socket is closed due to an overly-large request, check that the sent size differs from the received. Use a large buffer to ensure that the number of bytes sent are greater than the kernel TCP receive buffer size, as otherwise the send() call succeeds even though the bytes were never retrieved from the socket. Pass the MSG_NOSIGNAL flag (or the SO_NOSIGPIPE socket option) so that SIGPIPE is not generated when the socket is closed once the content length has been read. Close #47
| * get-pac-test: Call close() on an fdDavid King2017-01-011-5/+0
| | | | | | | | | | | | | | Do not call close() on the return value from send(), which is a number of bytes. Fixes #47
| * Add a test that ensures that query parameters are parsed and sentPaul van Tilburg2016-09-191-0/+9
| |
| * Add test for a PAC get without content lengthPaul van Tilburg2016-09-191-0/+21
| |
* | Why isn't SO_NOSIGPIPE defined when OSX manpage says its in sys/types.h, ↵Jeremy Linton2016-09-191-1/+3
| | | | | | | | sys/socket.h
* | Try slightly diffrent osx buildJeremy Linton2016-09-181-4/+4
| |
* | Fix intermittent unit test failures.Jeremy Linton2016-09-171-6/+12
|/ | | | | | | | | | | There are two things wrong with the unit test. First depending on the state of the socket the overflow send may terminate with either EBADF or EPIPE. Second, the length of the send is being used as the fd in the call to close. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
* Fix compilation errors with clangRamkumar Aiyengar2015-12-301-1/+3
|
* Fix test #10dominique.leuenberger@gmail.com2013-08-271-11/+19
| | | | | | | | | | | | | | | Fix the way we detect if get_pac correctly aborted on our server trying to send a > 102400 byte long stream (which we do to avoid malicious pac files/wpad server to buffer overflow us). Replace assert calls with proper error handling, which avoids the server from hanging (the write command to send the quit was wrapped in assert()). When not building for a Debug release with CMAKE, the -DNDEBUG is being specified, which in turn disables the assert macro. Fixes bug 189.
* Add HTTP client unit testnicolas.dufresne@gmail.com2012-10-152-0/+265
| | | | This should help in preventing regression that could lead to new security issues. This unit test only runs on Unix for now.
* Don't confuse ":" in path with a port dividernicolas.dufresne@gmail.com2012-07-051-0/+22
|
* On win32, init WSA in url-testnicolas.dufresne2010-10-061-0/+10
|
* add a test case for the URL with nothing but schemenpmccallum2010-09-291-0/+7
|
* Fix compilation with Visual Studionicolas.dufresne2010-09-011-0/+6
|
* Fixed crash in URL parsenicolas.dufresne2010-08-201-0/+7
|
* Fix KDE builds and tests, fixes #127 and #128npmccallum2010-06-131-1/+0
|
* rearrainge the build system ; make libmodman optionally build against ↵npmccallum2010-06-121-5/+5
| | | | external libmodman ; please test
* Implemented url::encode() and unit testnicolas.dufresne2010-06-022-0/+33
|
* Improved URL unit testnicolas.dufresne2010-06-011-21/+109
|
* Added URL test to demonstrate Issue 116nicolas.dufresne2010-05-262-0/+51