Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-2416

POM files should have application/xml content type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.6
    • Fix Version/s: 1.4.0
    • Component/s: UI
    • Labels:
      None
    • Environment:
      Linux x86-32

      Description

      When you right-click a POM in the UI and select "Download", the POM is downloaded without a content-type header. Depending on the browser, the file can be interpreted as text/plain or text/html, instead of XML.

      It's especially annoying in Firefox and Internet Explorer which interpret missing content-type as text/html, so they strip all the tags. This leaves you with a long line of useless concatenated text.

      Here's an example for the log4j pom:

      root@websphere:~# telnet localhost 8081
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.
      GET /nexus/content/repositories/central/log4j/log4j/1.2.15/log4j-1.2.15.pom HTTP/1.0

      HTTP/1.1 200 OK
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Set-Cookie: JSESSIONID=1qorw4ac9znlw;Path=/nexus
      Last-Modified: Thu, 30 Aug 2007 17:41:16 GMT
      ETag: "1483490805e8f86c21240958629905e733d079eb"
      Content-Length: 17780
      Date: Tue, 04 Aug 2009 13:44:32 GMT
      Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
      Accept-Ranges: bytes
      Server: Noelios-Restlet-Engine/1.1..1

      <!--
      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements. See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License. You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

      -->
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <packaging>jar</packaging>

      [remaining lines deleted]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cstamas Tamás Cservenák
                Reporter:
                deleted_user Deleted User
                Last Updated By:
                Peter Lynch
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m