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

Add ability to send custom HTTP headers #12579

Merged
merged 2 commits into from
Apr 24, 2020
Merged

Conversation

Chocobo1
Copy link
Member

Screenshots: GUI, WebUI

@Chocobo1 Chocobo1 added the WebAPI WebAPI-related issues/changes label Apr 22, 2020
@Chocobo1 Chocobo1 force-pushed the headers branch 2 times, most recently from 4ffd470 to 7c6a26f Compare April 22, 2020 14:02
@v0rap
Copy link

v0rap commented Apr 22, 2020

Awesome, Good job!

@sledgehammer999
Copy link
Member

Maybe the text should be "Add custom HTTP headers" ?

src/base/preferences.cpp Outdated Show resolved Hide resolved
src/webui/webapplication.cpp Outdated Show resolved Hide resolved
src/webui/webapplication.h Outdated Show resolved Hide resolved
Copy link
Member

@glassez glassez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"in server" in commit title seems to be incorrect. Shouldn't it be "to server"?
Also please use "HTTP" instead of "http" whenever possible.

@Chocobo1
Copy link
Member Author

"in server" in commit title seems to be incorrect. Shouldn't it be "to server"?

I will rename it to "Add ability to send custom HTTP headers".

@FranciscoPombal
Copy link
Member

Do you think the placeholder text could be changed to header: value pairs, one per line or something? I am a little concerned users might attempt to insert literal back-ticks otherwise. Then again, I think a user who would fiddle with this setting wouldn't do that. Up to you tbh.

@Chocobo1 Chocobo1 force-pushed the headers branch 2 times, most recently from a60c135 to be2ec15 Compare April 23, 2020 04:07
@Chocobo1
Copy link
Member Author

PR updated, addressed all comments.
Also added a new commit for fixing a minor issue.

QString::split() was giving a non-empty QStringList, and
that caused Session::setBannedIPs() to emit misleading warning message.
@Chocobo1 Chocobo1 added this to the 4.2.5 milestone Apr 23, 2020
@glassez glassez changed the title Add ability to send custom headers in http server Add ability to send custom HTTP headers Apr 23, 2020
@Chocobo1 Chocobo1 merged commit 708b9b9 into qbittorrent:master Apr 24, 2020
@Chocobo1 Chocobo1 deleted the headers branch April 24, 2020 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebAPI WebAPI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants