]> git.saurik.com Git - apt.git/blame - methods/http_main.cc
Wreck validation until we can assess ecosystem :/.
[apt.git] / methods / http_main.cc
CommitLineData
ea542140 1#include <config.h>
3927c6da 2#include <apt-pkg/fileutl.h>
47d278dc 3#include <apt-pkg/error.h>
217d575b 4#include <signal.h>
5f6b130d 5
5f6b130d
MV
6#include "http.h"
7
30060442 8int main(int, const char *argv[])
5f6b130d 9{
217d575b
MV
10 // ignore SIGPIPE, this can happen on write() if the socket
11 // closes the connection (this is dealt with via ServerDie())
12 signal(SIGPIPE, SIG_IGN);
30060442
DK
13 std::string Binary = flNotDir(argv[0]);
14 if (Binary.find('+') == std::string::npos && Binary != "http")
15 Binary.append("+http");
16 return HttpMethod(std::move(Binary)).Loop();
5f6b130d 17}