[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] Problem with command HTTPAPI using USER/PASSWORD



Richard,

The debug log you provided shows this:

SetError() #38: HTTP Auth values cannot contain a colon!

This is referring to the userid/password values. HTTPAPI does not allow you to have a userid or password with a colon character in it. Because of this, it is not adding the userid/password to your request.

It is done this way due to the way that HTTP authentication works. Under the covers, the HTTP protocol takes concatenates the userid/password separated by a colon, like this: "your-userid:your-password" and then base64 encodes them. Therefore, if you put a colon in the userid, it would confuse them.

It is very possible that colons should be allowed in the password? I have never run into the situation before... but you say it works with wget, which makes me think that perhaps HTTPAPI should only enforce this rule for the userid field, and not for the password?

Try this:

1) Open the HTTPAPIR4 source member.
2) Search for "HTTP_ATHVAL" to find the code
3) Comment-out the line that says " or %scan(':': pePasswd) > 0".
4) Repeat this for the other occurrence of HTTP_ATHVAL (there are two)
5) Save changes.
6) CALL INSTALL to recompile HTTPAPI

Then try your command. If this works for you, tell us, I will make the same adjustment to the next release of HTTPAPI.

-SK


On 3/14/2017 8:10 AM, la Croix, Richard wrote:
Hello Scott,

I wanted to use the following HTTPAPI (version 1.33) command to GET a json-file from an internal webservice:

HTTPAPI URL('https://testerlebnis-cms.xyz.com/translations/api/1.0/transifex_translation_request/status?project_slug=hapisol-itp-booking') DOWNLOAD('/temp/httpapi_transifex.json') USER('xxx_usr') PASS('yyy_pwd') DEBUG('/temp/httpapi_transifex.log')

Although I specify the required userid and password, the command ends with: "36 This page requires a user-id & password" (see attached debug log).

If I call the link in a browser or using wget, the service answers fine and returns the json-file.

I have used the HTTAPI command before for other downloads (with and without authentication) and never had any problem.

Any idea what could be wrong?

Best regards,
Richard

PS. I send you the required access data with private mail


*Richard la Croix *
Software Developer
IT & Telecommunication


Hapimag AG
Neuhofstrasse 8
6340 Baar
Schweiz

Phone   +41 (41) 7 67 81 53
Fax         +41 (41) 7 67 89 10
_richard.lacroix@xxxxxxxxxxx
_*facebook * <http://www.facebook.com/hapimag>

*_Geschaeftssitz:
_Hapimag AG
*Neuhofstrasse 8
6340 Baar
Schweiz
Eingetragen: Handelsregister des Kantons Zug
Firmennummer/UID: CHE-101.391.790
MWST.-Nr.: CHE-101.391.790 MWST
COB: Dr. Giatgen Peder Fontana
CEO: Hassan Kadbi

FinanceOfficeCH@xxxxxxxxxxx <mailto:FinanceOfficeCH@xxxxxxxxxxx>
Member of the Hapimag Group <http://www.hapimag.com/hapimaggroup>
www.hapimag.com <http://www.hapimag.com>





--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi