Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Error occured on locale except with 'C'. #4

Open
ynott opened this issue Nov 23, 2015 · 1 comment
Open

Error occured on locale except with 'C'. #4

ynott opened this issue Nov 23, 2015 · 1 comment

Comments

@ynott
Copy link

ynott commented Nov 23, 2015

Error occured on LANG is not 'C'.

[s3-curl]# printenv LANG
ja_JP.UTF-8
[s3-curl]# ./s3curl.pl --debug --id=XX -- "http://XXXXXX/x01"
s3curl: Found the url: host=XXXXXX; port=; uri=/x01; query=;
s3curl: ordinary endpoint signing case
s3curl: StringToSign='GET\n\n\n月, 23 11月 2015 04:15:12 +0000\n/x01'
s3curl: exec curl -H Date: 月, 23 11月 2015 04:15:12 +0000 -H Authorization: AWS SZ1Z33F6P0F4UG6FJ5SE:Mi/1p8nzX/BERKq26p0jafAcubE= -L -H content-type: http://XXXXXX/x01

AccessDenied

[s3-curl]# export LANG=C
[s3-curl]# ./s3curl.pl --debug --id=a00 -- "http://XXXXXX/x01"
s3curl: Found the url: host=XXXXXX; port=; uri=/x01; query=;
s3curl: ordinary endpoint signing case
s3curl: StringToSign='GET\n\n\nMon, 23 Nov 2015 04:24:29 +0000\n/x01'
s3curl: exec curl -H Date: Mon, 23 Nov 2015 04:24:29 +0000 -H Authorization: AWS SZ1Z33F6P0F4UG6FJ5SE:wFPu/wwdGxg7572gYi4Sn11lQwM= -L -H content-type: http://XXXXXX/x01

x011000false

setlocale( LC_ALL, "C" );
my $httpDate = POSIX::strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime );

I think that this will be fine.

@glance-
Copy link
Owner

glance- commented Nov 23, 2015

This isn't the upstream your looking for. This is some old code from Amazon which i hacked some to get it to do what i wanted, way back in time.

Anyhow, if you write a patch that looks good i'll take it, and maybe somewhere in time I or someone else will rebase this on top of the current version from Amazon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants