1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #3411 wontfix

git over https implementation depends on the user agent starting with "git"

Ryan Ackley
created an issue

I'm trying to write a javascript based git client that lives inside a browser extension. If I use a user agent that starts with "git", my client works. If it doesn't start with "git", bitbucket returns a 404 for git http endpoints.

The problem is that I can't set the user-agent of an xhr in production. I'm able to do it in development by intercepting the request with a local proxy and changing it before I send.

Comments (2)

  1. Dylan Etkin

    Hi dropkick,

    I am afraid that we can not change this behavior.

    When a request comes into the bitbucket site we use the user agent string to decide if we need to treat the request as a Git request or as a request from a browser. Obviously the Git request is handled differently with a totally different response type. If we accept any user agent we will not be able to tell when to treat the request as if it came from a git client vs a browser.



  2. Log in to comment