summaryrefslogtreecommitdiff
path: root/test/interactive-helper
AgeCommit message (Collapse)Author
2014-12-09dispose http(s) 416 error page as non-contentDavid Kalnischkies
Real webservers (like apache) actually send an error page with a 416 response, but our client didn't expect it leaving the page on the socket to be parsed as response for the next request (http) or as file content (https), which isn't what we want at all… Symptom is a "Bad header line" as html usually doesn't parse that well to an http-header. This manifests itself e.g. if we have a complete file (or larger) in partial/ which isn't discarded by If-Range as the server doesn't support it (or it is just newer, think: mirror rotation). It is a sort-of regression of 78c72d0ce22e00b194251445aae306df357d5c1a, which removed the filesize - 1 trick, but this had its own problems… To properly test this our webserver gains the ability to reply with transfer-encoding: chunked as most real webservers will use it to send the dynamically generated error pages. Closes: 768797
2014-10-24promote filesize to a hashstringDavid Kalnischkies
It is a very simple hashstring, which is why it isn't contributing to the usability of a list of them, but it is also trivial to check and calculate, so it doesn't hurt checking it either as it can combined even with the simplest other hashes greatly complicate attacks on them as you suddenly need a same-size hash collision, which is usually a lot harder to achieve.
2014-10-23add test for Basic Authentication schemeDavid Kalnischkies
Git-Dch: Ignore
2014-05-07Merge branch 'debian/sid' into debian/experimentalMichael Vogt
Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
2014-03-13warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies
Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
2014-03-13warning: type qualifiers ignored on function return type [-Wignored-qualifiers]David Kalnischkies
Reported-By: gcc -Wignored-qualifiers Git-Dch: Ignore
2014-03-13warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
2014-02-27Merge branch 'debian/sid' into debian/experimentalMichael Vogt
Conflicts: apt-private/private-list.cc configure.ac debian/apt.install.in debian/changelog
2014-02-14report https download start only if we really get itDavid Kalnischkies
Reporting it via progress means that e.g. a redirect will trigger it, too, so you get a Get & Hit while http only reports a Hit as it should be.
2014-01-16correct some style/performance/warnings from cppcheckDavid Kalnischkies
The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
2013-11-30tests: add a webserverconfig method to abstract configDavid Kalnischkies
The URI to use to set a config option is a bit arcane to write/remember and checking if the setting was successful doubly so. Git-Dch: Ignore
2013-11-30webserver: use pthreads to handle multiple clientsDavid Kalnischkies
Clients like browsers prefer to open many connections and keep them open for a while, so that pages with lot of subelements would take a while to load (if at all), by using threads as all servers do some way or another we can resolve this. libapt is not intended to be pthread-safe and stuff like the storage of the last return code doesn't make too much sense if multiple clients interact with us, but it is good enough for now and an other interesting (mis)use of libapt in general. Git-Dch: Ignore
2013-11-30webserver: strip parameters from filenameDavid Kalnischkies
Again, not (currently) used by the tests itself, but in interactive usage of the webserver itself. Git-Dch: Ignore
2013-11-30webserver: add directoryIndex support defaulting to index.htmlDavid Kalnischkies
Git-Dch: Ignore
2013-11-30webserver: implement ~user access to ~user/public_html/David Kalnischkies
pretty much useless for the testcases, but handy to test the webserver itself in 'real world' environments Git-Dch: Ignore
2013-11-30webserver: spurious newline after data confuses curlDavid Kalnischkies
Webserver wrongly sends an additional newline after the data which causes curl to believe that the next request on this socket has no header data and so includes all headers in the data output. Git-Dch: Ignore
2013-09-30add Range and If-Range support in the webserverDavid Kalnischkies
Git-Dch: Ignore
2013-09-30access _config via GET requests in the webserverDavid Kalnischkies
Git-Dch: Ignore
2013-08-15Merge branch 'debian/sid' into debian/experimentalMichael Vogt
Conflicts: apt-pkg/contrib/strutl.cc apt-pkg/deb/dpkgpm.cc configure.ac debian/changelog doc/po/apt-doc.pot po/apt-all.pot po/ar.po po/ast.po po/bg.po po/bs.po po/ca.po po/cs.po po/cy.po po/da.po po/de.po po/dz.po po/el.po po/es.po po/eu.po po/fi.po po/fr.po po/gl.po po/hu.po po/it.po po/ja.po po/km.po po/ko.po po/ku.po po/lt.po po/mr.po po/nb.po po/ne.po po/nl.po po/nn.po po/pl.po po/pt.po po/pt_BR.po po/ro.po po/ru.po po/sk.po po/sl.po po/sv.po po/th.po po/tl.po po/uk.po po/vi.po po/zh_CN.po po/zh_TW.po test/integration/framework test/integration/test-bug-602412-dequote-redirect test/integration/test-ubuntu-bug-346386-apt-get-update-paywall test/interactive-helper/aptwebserver.cc test/interactive-helper/makefile
2013-07-26request absolute URIs from proxies again (0.9.9.3 regession)David Kalnischkies
Commit 2b9c9b7f28b18f6ae3e422020e8934872b06c9f3 not only removes keep-alive, but also changes the request URI send to proxies which are required to be absolute URIs rather than the usual absolute paths. Closes: 717891
2013-06-24simple fork and pidfile aptwebserverDavid Kalnischkies
Forking only after being ready to accept clients avoids running races with the tests which sometimes failed on the first 'apt-get update' (or similar) with the previous background-start and hope for the best… The commit fixes also some oversight output-order changes in regards to Description-md5 and (I-M-S) race conditions in various tests. Git-Dch: Ignore
2013-06-20trigger NODATA error for invalid InRelease filesDavid Kalnischkies
With the selfgrown splitting we got the problem of not recovering from networks which just reply with invalid data like those sending us login pages to authenticate with the network (e.g. hotels) back. The good thing about the InRelease file is that we know that it must be clearsigned (a Release file might or might not have a detached sig) so if we get a file but are unable to split it something is seriously wrong, so there is not much point in trying further. The Acquire system already looks out for a NODATA error from gpgv, so this adds a new error message sent to the acquire system in case the splitting we do now ourselves failed including this magic word. Closes: #712486
2013-06-20simple URI rewrite rules config for webserverDavid Kalnischkies
we have a test which required traditionally lighttpd to be executed as it requires a webserver supporting some kind of URI rewriting. Now with some lines of code our own webserver can do this and the testcase can be enabled by default. This test hinted at the bug fixed in the previous commit, so having more tests which can easily be run is a good thing. Git-Dch: Ignore
2013-06-20add directory listing to the webserverDavid Kalnischkies
Git-Dch: Ignore
2013-06-20add a simple webserver for our testcasesDavid Kalnischkies
APT needs to acquire data in a secure fashion over an inherently unsecure way, known as the internet, while communicating with unreliable partners, known as webservers and proxies. For your integration tests we so far relied on 'normal' webservers, but all of them have certain quirks and none is able to provide us with all quirks which can be observed in the wild and we therefore have to test with, so this webserver isn't trying to be fast, secure or feature complete, but to provide all the quirks we need in a consistent way. This webserver also makes the APT project self-contained, as it is now able to generate, serve as well as acquire package indexes. ;) Git-Dch: Ignore
2013-06-09stop building l10n if strings are unchangedDavid Kalnischkies
The buildsystem tried to build l10n for test applications which never produced the output it expected causing it to try building it all the time.
2012-07-12add (partial) partial request support for the webserverDavid Kalnischkies
2012-07-11add option to send Content-Type based on file extensionDavid Kalnischkies
2012-07-11make the server a little more robust against write errors (e.g. broken pipe)David Kalnischkies
2012-07-11rework parsing of the first request-line to be more robustDavid Kalnischkies
2012-07-11add simple url rewriting to the webserverDavid Kalnischkies
2012-07-11ensure that directories are accessed with a slash at the end of the urlDavid Kalnischkies
2012-07-10http get requests need to be dequotedDavid Kalnischkies
2012-07-10include our usual config.h in the webserverDavid Kalnischkies
2012-07-10implement directory listing in your webserverDavid Kalnischkies
2012-07-10reformat the aptwebserver code to look more like the rest of APTDavid Kalnischkies
2012-07-10cleanup, thanks to donkult for his feedbackMichael Vogt
2012-07-10always send content-length via the new addDataHeaders() to ensure w3m/curl ↵Michael Vogt
are happy too for 404 pages and to comply with the http 1.1 spec
2012-07-10add failing regression test for bug #346386Michael Vogt
2012-07-10add commandline, add configurable port, add --simulate-paywall to simulate a ↵Michael Vogt
broken webserver that intercepts connections and returns nonsese
2012-07-09start implementing an extremely simple webserver for testing APTDavid Kalnischkies
2012-03-22* apt-inst/database.{cc,h}, apt-inst/deb/dpkgdb.{cc,h}:David Kalnischkies
- drop instead of fix as it is only needed if you want to reimplement dpkg and comes straight from the beginning of last decade (Closes: #663372) * apt-inst/deb/debfile.cc: - {Extract,Merge}Control() is another instance of "lets reimplement dpkg" so shot of this code before someone ends up using this…
2012-03-20for these helpers we don't need too much checks,David Kalnischkies
but no warnings from gcc helps
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies
2011-09-19do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies
2011-08-17fix 'comparison between signed and unsigned integer expressions' warningDavid Kalnischkies
in the udevcdrom testcase
2011-08-17move the networkless test to the interactive helpers as it needsDavid Kalnischkies
root rights for operation (ifup/down, iptables) so it is better run under supervision
2011-08-17move the interactive helper to a subdirectory of testDavid Kalnischkies