I cannot view any of the REST API methods in IE7. I get a message from IE saying it tried to download a file and failed, or I get a 404.

      If I use the exact same URLs in Firefox, they work fine.

          Form Name

            [BAM-4533] Cannot view REST in IE7

            Fixed in Atlassian REST

            Marek Went (Inactive) added a comment - Fixed in Atlassian REST

            sladey added a comment -

            This is too risky to do at this time in 2.4 so moving to next bug fix.

            sladey added a comment - This is too risky to do at this time in 2.4 so moving to next bug fix.

            MarkC added a comment -

            Had a chat to Sam and he's fine with you making the required changes in common REST plugin. Apparently there's already a workaround for Jersey & IE (something about text/html content types or something) that you know about. We can add a specific workaround to default to XML for IE.

            If you can update the REST plugin & test it out, Sam will do a point release

            MarkC added a comment - Had a chat to Sam and he's fine with you making the required changes in common REST plugin. Apparently there's already a workaround for Jersey & IE (something about text/html content types or something) that you know about. We can add a specific workaround to default to XML for IE. If you can update the REST plugin & test it out, Sam will do a point release

            So far it looks like:
            If we handle the request and produce response (regular successful call) we define content-type as:

            @Consumes(

            {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
            @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}

            )

            so if no content type is specified (just / in http Accept header) we use DEFAULT xml (first on the list).
            This works, even in IE

            It is more complicated for exceptions. For exceptions response is build using Status class defined in atlassian-rest module.
            This class does not specify any content type (however it is possible) so there is no way to enforce xml.
            We can build our exceptions and build response by hand, but this will apply only for exceptions we throw.
            For IE8 bug we have NotAuthenticatedException - thrown by filter if no authentication is applied. So, we don't control this exception.

            This could be fixed globally in Atlassian REST, however I wonder what criteria should be used? If request specify / we could return xmk, but this should be consistent across all REST API in all products - so really should be done in Atlassian REST.

            Marek Went (Inactive) added a comment - So far it looks like: If we handle the request and produce response (regular successful call) we define content-type as: @Consumes( {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON} ) so if no content type is specified (just / in http Accept header) we use DEFAULT xml (first on the list). This works, even in IE It is more complicated for exceptions. For exceptions response is build using Status class defined in atlassian-rest module. This class does not specify any content type (however it is possible) so there is no way to enforce xml. We can build our exceptions and build response by hand, but this will apply only for exceptions we throw. For IE8 bug we have NotAuthenticatedException - thrown by filter if no authentication is applied. So, we don't control this exception. This could be fixed globally in Atlassian REST, however I wonder what criteria should be used? If request specify / we could return xmk, but this should be consistent across all REST API in all products - so really should be done in Atlassian REST.

            sladey added a comment -

            I think we should investigate a fix for this during this week.

            sladey added a comment - I think we should investigate a fix for this during this week.

            Andrew added a comment - - edited

            I agree with Mark. I think a customer would come to the REST API expecting to see an XML response, without having to add .xml to the end.

            My personal opinion is that the behaviour should also be consistent across browsers.

            Andrew added a comment - - edited I agree with Mark. I think a customer would come to the REST API expecting to see an XML response, without having to add .xml to the end. My personal opinion is that the behaviour should also be consistent across browsers.

            MarkC added a comment -

            Can't we default it to XNL if the content type is unknown?

            MarkC added a comment - Can't we default it to XNL if the content type is unknown?

            I would it call rather feature than workaround.
            Basically, if you don't have a control, what kind on Accept: header is sent with request (like using browser, test framework etc.) you can always enforce response format using .xml or .json.

            I think it could be documented.

            BTW, as well as os_authType=basic parameter if basic authentication is used (when no cookie is used).

            Marek Went (Inactive) added a comment - I would it call rather feature than workaround. Basically, if you don't have a control, what kind on Accept: header is sent with request (like using browser, test framework etc.) you can always enforce response format using .xml or .json. I think it could be documented. BTW, as well as os_authType=basic parameter if basic authentication is used (when no cookie is used).

            Andrew added a comment -

            Adding an .xml extension seems to work.

            Please let me know if you want me to document this as a workaround.

            Andrew added a comment - Adding an .xml extension seems to work. Please let me know if you want me to document this as a workaround.

            Marek Went (Inactive) added a comment - - edited

            This is probably HTTP Content-Type header problem. I have to check this, but looks like IE does not set it.
            You probably are receiving JSON response, or content-type is unknown for server (like text/plain ?) so it returns 404

            You can just use .xml extension just before query parameters ? ie:

            http://localhost:8085/bamboo/rest/api/latest/build/PROJECT-PLAN-10.xml?expand=artifacts ...

            Marek Went (Inactive) added a comment - - edited This is probably HTTP Content-Type header problem. I have to check this, but looks like IE does not set it. You probably are receiving JSON response, or content-type is unknown for server (like text/plain ?) so it returns 404 You can just use .xml extension just before query parameters ? ie: http://localhost:8085/bamboo/rest/api/latest/build/PROJECT-PLAN-10.xml?expand=artifacts ...

              mwent Marek Went (Inactive)
              alui Andrew
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: