2012-08-29 21:56:07 |
nik.martin |
description |
The host headers for Accept Bytes, etc are not case sensitive, so a case insensitive comparison should be done:
This is how httpfs2 looks for the string "Accept-Ranges: Bytes"
static int mempref(const char * mem, const char * pref, size_t size)
{
/* return true if found */
if (size < strlen(pref)) return 0;
return ! memcmp(mem, pref, strlen(pref));
}
nginx servers return this:
HTTP/1.1 200 OK
Server: nginx/1.0.14
Date: Wed, 29 Aug 2012 21:45:33 GMT
Content-Type: text/plain; charset=ascii
Connection: keep-alive
content-length: 9871
x-robots-tag: noindex,nofollow
accept-ranges: bytes
etag: 1486n
pragma: public
cache-control: max-age=0
so the string comparison should do a case insensitive string comparison.
I will add a patch later, but I'm on to nother project at the moment that is a higher priority. The project is dead on sourceforge
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: httpfs2 0.1.4-1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Uname: Linux 3.2.0-29-generic-pae i686
NonfreeKernelModules: wl
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
Date: Wed Aug 29 16:50:07 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SourcePackage: httpfs2
UpgradeStatus: No upgrade log present (probably fresh install) |
The http host headers for Accept-Ranges, etc. are not case sensitive, so a case insensitive comparison should be done:
This is how httpfs2 looks for the string "Accept-Ranges: Bytes"
static int mempref(const char * mem, const char * pref, size_t size)
{
/* return true if found */
if (size < strlen(pref)) return 0;
return ! memcmp(mem, pref, strlen(pref));
}
nginx servers return this:
HTTP/1.1 200 OK
Server: nginx/1.0.14
Date: Wed, 29 Aug 2012 21:45:33 GMT
Content-Type: text/plain; charset=ascii
Connection: keep-alive
content-length: 9871
x-robots-tag: noindex,nofollow
accept-ranges: bytes
etag: 1486n
pragma: public
cache-control: max-age=0
so the string comparison should do a case insensitive string comparison.
I will add a patch later, but I'm on to nother project at the moment that is a higher priority. The project is dead on sourceforge
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: httpfs2 0.1.4-1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Uname: Linux 3.2.0-29-generic-pae i686
NonfreeKernelModules: wl
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
Date: Wed Aug 29 16:50:07 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SourcePackage: httpfs2
UpgradeStatus: No upgrade log present (probably fresh install) |
|