brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] shell's "user agent" string should include product name #2124

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by joelrbrandt Tuesday Nov 27, 2012 at 00:07 GMT Originally opened as https://github.com/adobe/brackets/issues/2213


Currently, the user-agent sent along with HTTP requests from the shell is:

User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.91 Safari/537.1

Ideally, this should include the product name (either "Brackets" or "Edge Code").

According to@jasonsanjose it "should be easy to set CefSettings.user_agent. We configure settings in cefclient AppGetSettings."

core-ai-bot commented 3 years ago

Comment by pthiess Wednesday Nov 28, 2012 at 18:40 GMT


@jasonsanjose - we didn't have this in the last release, so I don't think this is critical, correct?

core-ai-bot commented 3 years ago

Comment by jasonsanjose Wednesday Nov 28, 2012 at 18:44 GMT


Not critical, but double check with@joelrbrandt. This issue originated from the EWF reporting task. It seems like we'll be using SiteCatalyst for this now, so it's possible we can retire this issue if there's no other need.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Sunday Dec 23, 2012 at 17:10 GMT


@jasonsanjose I looked into this, and it looks like doing it well will be difficult. Ideally, we'd want the user agent string to have all of the WebKit, etc. versions in it. So, we'd want it to look something like:

Brackets/Sprint18 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.91 Safari/537.1

However, in AppGetSettings, we don't have access to the default user_agent. And, it looks like the default user_agent isn't even part of CEF. So, we don't really have a way to EXTEND the user agent. We can only replace it.

We could, of course, hardcode those versions. But that would mean that when we update CEF, we need to remember to update this string manually.

What do you think?

core-ai-bot commented 3 years ago

Comment by joelrbrandt Sunday Dec 23, 2012 at 17:12 GMT


Actually, even hardcoding it will be difficult, due to different version numbers on different platforms.

The right way to do this might be to try to convince the CEF guy to add an "extend the user agent" function to the API.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Monday Dec 24, 2012 at 14:51 GMT


@jasonsanjose Aha! There's another setting called product_version which gets incorporated into the User Agent string if we don't set a custom user agent.

See: http://code.google.com/searchframe#SgTHaFLUelA/trunk/libcef/cef_process_ui_thread.cc&q=user_agent%20package:chromiumembedded%5C.googlecode%5C.com&l=147

I'll submit a pull request using this. Re-assigning the bug to me.

core-ai-bot commented 3 years ago

Comment by joelrbrandt Wednesday Jan 02, 2013 at 18:17 GMT


As mentioned in #2442, it looks like we can use Info.plist/VERSIONINFO to get the sprint number in the string. https://github.com/adobe/brackets/issues/2442#issuecomment-11817284

core-ai-bot commented 3 years ago

Comment by joelrbrandt Thursday Jan 03, 2013 at 21:18 GMT


Confirming fixed. Closing.