[Slackbuilds-users] sbog ping: invalid download urls in .info files
rundstutzen at gmx.de
rundstutzen at gmx.de
Fri Mar 2 16:46:35 UTC 2018
i didn't even know that sbosrcarch does exist (even though i have seen
slackware.uk before). so the functionality i programmed does already
exist. i can't find the sources of your ping script, though.
On Thu, 1 Mar 2018 14:21:12 -0500
B Watson <yalhcru at gmail.com> wrote:
> On 3/1/18, rundstutzen at gmx.de <rundstutzen at gmx.de> wrote:
> > to understand the cause of some errors one has to know
> > how "sbog ping" works. for http urls a http "HEAD" request is send
> > to test if the url is valid. this can cause trouble, as some
> > servers are picky about the request method ("GET" vs. "HEAD").
> I ran into this when working on sbosrcarch. Not only do some servers
> not allow HEAD, there are also some that allow it but don't report the
> same info as GET (missing Content-length header, usually). The way I
> work around it is to do an actual GET request, but close the
> connection after the headers are received (before the content).
i hate workarounds with passion. its one of the banes of the software
industry. what i am trying to do is actually what HEAD requests were
i had to fiddle but i got it working - most of the times. i had to add
some code for amazons3 servers (you probably know why), this saved me
from using get, so this is the price i'm willing to pay. i am happy
with the result (except the amazons3 code). there are a few servers
that will fail - but alas - these servers are not supported by "sbog
ping". if a server is not able to properly handle a HEAD request (which
is not hard) then this is not the fault of sbog.
> sbosrcarch calls the curl command line tool, so it does this:
> curl --head -X GET $url
if i read the output of "curl -v --head -X GET $url" correctly: the
server will get a GET request, so the server (or proxy) will start
sending the body (before the request is closed/cancelled), causing
traffic overhead. correct me if i'm wrong. i don't want to do that.
there is another reason i am don't want to use GET requests: sbog uses a
client pool, sending request concurrently to servers. this speeds
things up *a lot*. i don't want to send several GET request to a
More information about the SlackBuilds-users