[Slackbuilds-users] sbog ping: invalid download urls in .info files

B Watson yalhcru at gmail.com
Thu Mar 1 19:21:12 UTC 2018


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).

sbosrcarch calls the curl command line tool, so it does this:

curl --head -X GET $url

sbog is written in a compiled language, presumably doesn't call external
commands like this, but you can do the same thing. Send a GET request,
read the headers until you get a blank line, then close the connection.


More information about the SlackBuilds-users mailing list