Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Siege is support form-data? #139

Closed
AntSworD opened this issue Aug 16, 2018 · 4 comments
Closed

Siege is support form-data? #139

AntSworD opened this issue Aug 16, 2018 · 4 comments

Comments

@AntSworD
Copy link

Can I post form-data ?

siege -c 1 -r 1 -T "multipart/form-data;boundary=123456" -g 'http://127.0.0.1:3000/results POST < data.txt'

The data.txt is form-data content, such as:

------123456
Content-Disposition: form-data; name="result"

result-data
------123456--

Final I got:

POST /results HTTP/1.0
Host: 127.0.0.1:3000
Accept: */*
Accept-Encoding: gzip;deflate
User-Agent: Mozilla/5.0 (apple-x86_64-darwin17.0.0) Siege/4.0.4
Connection: close
Content-type: text/plain
Content-length: 90

------123456
Content-Disposition: form-data; name="result"

result-data
------123456--

The -T didn't work

The content-type overwrite by the file type detect, and didn't specify a file type for form-data
https://github.com/JoeDog/siege/blob/master/src/load.c#L46

@JoeDog
Copy link
Owner

JoeDog commented Aug 16, 2018 via email

@JoeDog
Copy link
Owner

JoeDog commented Aug 16, 2018 via email

@JoeDog
Copy link
Owner

JoeDog commented Aug 16, 2018 via email

@AntSworD
Copy link
Author

@JoeDog It is work! Thank you very much

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

No branches or pull requests

2 participants