Issue #2494 resolved

Trouble with file uploads from downloads page access via CNAME (BB-1243)

Wes Garland
created an issue

I'm trying to upload a file. I select the file with the file upload form element, submit the form, and the file appears to upload.

When it's finally done, the bitbucket GUI comes back and says, "You must select a filename".

The file is a PDF if that matters.

Comments (20)

  1. Dylan Etkin
    • changed status to open

    Hi Wes,

    Can you provide more details? What browser are you using? Were you accessing the repository via CNAME or bitbucket.org?

    I am able to upload a file just fine using bitbucket.org but I am getting an error when trying from a CNAME. Please let me know if you were accessing the repo via a CNAME.

    Until we can fix the bug you should be able to upload the file via access through bitbucket.org.

    Thanks,

    Dylan

  2. Wes Garland reporter

    Dylan:

    This worked perfectly from my office machine -- same file and everything -- will test again when I'm at home.

    Home machine is on the latest Firefox 4 beta, the office is on a slightly-newer Firefox nightly.

    I haven't configured a CNAME for use with BitBucket yet, so I can't see that being the issue, unless there is some way to accidentally navigate to one that I didn't notice? I tried http://www instead of https://, that didn't trigger the bug as the redir works properly.

    I'll test at home tonight, see if I can repro; if I can, I'll then try to repro with Safari.

    Wes

  3. Wes Garland reporter
    • changed status to new

    Okay - I can repro this issue from home.

    Observation: When at home, the file is uploaded with HTTP instead of HTTPS -- a) that's really not great, b) I don't remember that from my office experience.

    Oh - the exact message I get is "You must enter a filename." And, FWIW, my uploads are going to bbuseruploads.s3.amazonaws.com.

    • further digging* - placing a Squid proxy in front of my browser makes no difference -- but switching to Safari resolves my issue.

    Ugh - this means we may have Firefox 4 / BitBucket issue.

    Have you guys started testing Firefox 4, yet? I'm on 4.0b11 here; b12 is on schedule to be the last beta.

  4. Wes Garland reporter

    Wow, this stuff is hard to put your fingers on sometimes!

    My diagnostic steps above did not correctly eliminate the proxy between my browser and the network. Without the proxy, I am able to upload okay. With the proxy, I have difficulty with large files, but not small ones.

    So, maybe this issue is really "Large uploads fail with HTTP proxy in play" -- ugh.

    I have a packet capture of the failed upload -- it looks okay to me, a normal HTTP multipart form subimission, including the trailing boundary marker and a content-length in the right ballpark.

    The response coming back from the server is

    HTTP/1.0 303 See Other x-amz-id-2: 7WTnvVaBURjKzwBMnCXz4MKGoowAwNkkrasPD2/KW85Hy6qDwcdnMghXhXO+mm5L x-amz-request-id: 16D6B9074CE14305 Date: Thu, 17 Feb 2011 13:10:57 GMT ETag: "4f7b9d22bc00c12702c154e77bdff681" Location: https://bitbucket.org/wesgarland/tic/downloads/add?bucket=bbuseruploads&key=wesgarland%2Ftic%2Fdownloads%2Fplan9-1.pdf&etag=%224f7b9d22bc00c12702c154e77bdff681%22 Content-Length: 0 Server: AmazonS3 X-Cache: MISS from mars.page.ca Via: 1.0 mars.page.ca:8001 (squid/2.6.STABLE19) Proxy-Connection: keep-alive

    After that, my browser opens an SSL connection to bitbucket, which is presumably when I get the "no filename" error.

  5. Cero

    I just tested it with an upload of about 2.7KB in size and got the following error message when using my custom domain (CNAME).

    <Error> <Code>AccessDenied</Code> <Message> Invalid according to Policy: Policy Condition failed: ["eq", "$success_action_redirect", "http.or.https://my.custom.domain/my.user/my.repo/downloads/add"] </Message> <RequestId>some.hex.values</RequestId> <HostId> some.base64.encoded.host.id </HostId> </Error>

    Upload works via bitbucket.org (without custom domain).

  6. Log in to comment