rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: kulbir on October 25, 2019, 08:06:46 AM

Title: Mimetype application/x-www-form-urlencoded Not Support
Post by: kulbir on October 25, 2019, 08:06:46 AM
Hi Friends,

I'm new user of the HFS server and I just like it.

Kudos to the developers!!

I have just setup a site with HFS server and everything seems to be working fine.

I'm using basic authentication (username/password) and files and there are user specific storage folders configured.

I have tested alot of scenarios using postman and they all seem to work, except for one.

When I'm posting data as body->raw, which actually means "application/x-www-form-urlencoded" the HTTP POST is successfuly and I get 200 OK but the data that was sent in the body->raw isn't captured anywhere. I have updated the mime-type list and tried multiple combinations as well but NO SUCCESS.

I would appreciate any help with this situation.

Thanks in advance!

Kulbir

Thank you!
Title: Re: Mimetype application/x-www-form-urlencoded Not Support
Post by: bmartino1 on October 26, 2019, 09:42:41 PM
not sure, but even with raw being forward ed, you have to define the contianer other wise its lost in transltion.

How are you sending this to hfs? a post request? xhtml post? curl?

more info is need for me to test. this might be a rejeto/mars question

or a template question...
Title: Re: Mimetype application/x-www-form-urlencoded Not Support
Post by: kulbir on October 28, 2019, 08:47:39 AM
Hi There,

Thanks for the response, here’s a bit of explanation:-

I’m currently using postman for my testing to mimic the behaviour of source system.

Following is my setup:-

Aws EC2 with windows server 2012 r2

Windows firewall inbound ports 80/443

Hfs server configured on port 80

Stunnel is installed and configured to support ssl/https

There no issue with connection on http/https as I get the login page for hfs in browser:-

While testing this whole setup from my local machine via POSTMAN:-

I can perform successful https post on 443 with basic Authentication and body set to multipart form data.

Attached file gets delivered to destination and gets stored in the mapped folder mo challenges.

But when Im changing the body to raw and pasting the file content as part of the request, I still get 200ok and request is also acknowledged with success but the raw data isn’t separated from the request and stored separately.

Which is my actual requirement. Do you think this is possible via hfs or anyone has achieved it?

Thanks in anticipation.
Title: Re: Mimetype application/x-www-form-urlencoded Not Support
Post by: bmartino1 on October 28, 2019, 08:39:33 PM
i'm new to post man, so i'm not sure it is possible with post man.

https://www.toolsqa.com/postman/download-and-install-postman/

I know that html post request and curl commands work to send raw data, so it should be possible, but i'm unaware of those setups and capabilities.

This would be more of a mars/rejeto as idk how hfs answers that raw data input.
the 200 Ok means that it at least authenticated and hit its link, so i don't think hfs (with out some macro code or other tpl html data) handled that raw input correctly.

the only other account i have found with getting a 200 OK response and a upload fail is here:
http://rejetto.com/forum/index.php?topic=11955.0
http://rejetto.com/forum/index.php?pretty;board=hfs-~-http-file-server;topic=changing-http-response-header.0

I vaguely remember having to add a html head for it to hit in response.

You might need to add a hfs diferent template or add some html code:

Code: [Select]
{.add to log|{.add header|Server:APACHE.}Macro ADD HEADER executed.}