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 User-Agent header to HTTPRequest #113

Merged
merged 2 commits into from Aug 2, 2016

Conversation

Projects
None yet
3 participants
@kunall17
Collaborator

kunall17 commented Aug 2, 2016

Implement #111
Adds header like ZulipAndroid-0.8.9
And upgrade okHttp library dependency

@smarx

This comment has been minimized.

smarx commented Aug 2, 2016

Automated message from Dropbox CLA bot

@kunall17, it looks like you've already signed the Dropbox CLA. Thanks!

@@ -158,12 +158,12 @@ public String getApiKey() {
public String getUserAgent() {
try {
return ZulipApp.USER_AGENT
+ "/"
+ "-"

This comment has been minimized.

@niftynei

niftynei Aug 2, 2016

Contributor

This should stay as a /. User agents are usually in the form software/version

+ getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
} catch (NameNotFoundException e) {
// This should… never happen, but okay.
ZLog.logException(e);
return ZulipApp.USER_AGENT + "/unknown";
return ZulipApp.USER_AGENT + "-unknown";

This comment has been minimized.

@niftynei

niftynei Aug 2, 2016

Contributor

Same as above comment. This should stay as a slash.

@niftynei

This comment has been minimized.

Contributor

niftynei commented Aug 2, 2016

See comments about / vs -.

Otherwise lgtm

@niftynei niftynei merged commit eebc7d8 into zulip:master Aug 2, 2016

@niftynei

This comment has been minimized.

Contributor

niftynei commented Aug 2, 2016

Thanks @kunall17 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment