italia / dati.gov.it

dati.gov.it: il sito degli opendata italiani
http://dati.gov.it
Creative Commons Zero v1.0 Universal
53 stars 4 forks source link

Parametro image_url di un'organizzazione restituisce informazioni non interpretate correttamente #10

Open aborruso opened 7 years ago

aborruso commented 7 years ago

Quando accedo all'URL presente nell'image_url di un'organizzazione, il browser non riesce a interpretare correttamente la risposta.

Ad esempio con http://www.dati.gov.it/sites/default/files/pbz-organization-logo-horizontal_1 ottengo

image

Sotto una di queste organizzazioni.

Grazie

{
  "help": "Return the metadata of a dataset (package) and its resources. :param id: the id or name of the dataset :type id: string",
  "success": true,
  "result": {
    "id": "15a5f8af-8bd5-4612-bf30-53919841d1dc",
    "name": "krankenhausversorgung-erste-hilfe-0",
    "title": "Krankenhausversorgung: Erste Hilfe",
    "notes": "<p>Alle öffentlichen Krankenhäuser des Landes verfügen über einen Erste-Hilfe-Dienst.<br />\nIm Laufe des Jahres 2015 verzeichneten die Erste-Hilfe-Dienste der öffentlichen Landeskrankenhäuser  Bozen, Meran, Brixen, Innichen, Sterzing und Schlanders,  203.371 Zugänge. Die Daten der Landeskrankenhäuser  Bozen und Bruneck sind zur Zeit nicht vollständig.<br />\nIn Bezug auf die Zugänge mit darauffolgendem Krankenhausaufenthalt registrieren die einzelnen Landeskrankenanstalten unterschiedliche Werte: von 16,1 des Krankenhauses Bozen, 12,0% des Krankenhauses Brixen und 11,2% in Schlanders,  zu 6,7% von Innichen. Diese Unterschiede sind zum Teil auf die verschiedenen Aufenthalts- und Dienstorganisationsverfahren und zum Teil auf die diversen Datenerfassungsmodalitäten der Gesamtzugänge und Zugänge, die einen Krankenhausaufenthalt zur Folge hatten, zurückzuführen.</p>\n",
    "url": "Property field_landing_page",
    "state": "Active",
    "log_message": "Update to resource 'Tab. 5.1.2 - Trend del numero di accessi ai servizi di pronto soccorso'",
    "revision_timestamp": "2017-03-11T03:20:01+01:00",
    "metadata_created": "2016-08-31T08:16:31+02:00",
    "metadata_modified": "2016-10-04T13:29:52+02:00",
    "creator_user_id": "9bcba160-349c-4d14-8a53-d4168349d053",
    "type": "Dataset",
    "resources": [
      {
        "id": "956e58d1-3ccc-4f6c-94a4-c6858a712ff1",
        "revision_id": "",
        "url": "http://www.provinz.bz.it/eb/gesundheitsbericht/erste-hilfe.asp?rels_tfl=5QP7ZO20.wOnWXJvng0spqv9jG8RtDxX",
        "description": "",
        "format": "csv",
        "state": "Active",
        "revision_timestamp": "Lunedì 06 Marzo 2017",
        "name": "Tab. 5.1.1 - Numero di accessi ai servizi di pronto soccorso",
        "mimetype": "csv",
        "size": "",
        "created": "",
        "resource_group_id": "6a685ae2-6155-44f6-b033-e10874447811",
        "last_modified": ""
      },
      {
        "id": "86d82e30-dc28-4522-aeb9-7cea2b49025c",
        "revision_id": "",
        "url": "http://www.provinz.bz.it/eb/gesundheitsbericht/erste-hilfe.asp?rels_tfl=HCh7ZO20.wOnWXJvng0spqv9jG8Rst8C",
        "description": "",
        "format": "pdf",
        "state": "Active",
        "revision_timestamp": "Lunedì 06 Marzo 2017",
        "name": "Tab. 5.1.1 - Numero di accessi ai servizi di pronto soccorso",
        "mimetype": "pdf",
        "size": "",
        "created": "",
        "resource_group_id": "6a685ae2-6155-44f6-b033-e10874447811",
        "last_modified": ""
      },
      {
        "id": "1ff818bc-9b78-455f-be24-55c534887d43",
        "revision_id": "",
        "url": "http://www.provinz.bz.it/eb/gesundheitsbericht/erste-hilfe.asp?rels_tfl=wCe7ZO20.wOnWXJvng0spqv-jG8RtDxX",
        "description": "",
        "format": "csv",
        "state": "Active",
        "revision_timestamp": "Lunedì 06 Marzo 2017",
        "name": "Tab. 5.1.2 - Trend del numero di accessi ai servizi di pronto soccorso",
        "mimetype": "csv",
        "size": "",
        "created": "",
        "resource_group_id": "6a685ae2-6155-44f6-b033-e10874447811",
        "last_modified": ""
      },
      {
        "id": "8d78bdbf-dc87-4a63-a09c-aa3a365dda99",
        "revision_id": "",
        "url": "http://www.provinz.bz.it/eb/gesundheitsbericht/erste-hilfe.asp?rels_tfl=3xe7ZO20.wOnWXJvng0spqv-jG8Rst8C",
        "description": "",
        "format": "pdf",
        "state": "Active",
        "revision_timestamp": "Lunedì 06 Marzo 2017",
        "name": "Tab. 5.1.2 - Trend del numero di accessi ai servizi di pronto soccorso",
        "mimetype": "pdf",
        "size": "",
        "created": "",
        "resource_group_id": "6a685ae2-6155-44f6-b033-e10874447811",
        "last_modified": ""
      }
    ],
    "tags": [
      {
        "id": "613939c5-961a-410f-98d5-527e3907ddc6",
        "vocabulary_id": "2",
        "name": "Assistenza sanitaria"
      }
    ],
    "organization": [
      {
        "title": "PAB: Rip. Sanità",
        "description": "",
        "id": "6a685ae2-6155-44f6-b033-e10874447811",
        "image_url": "http://www.dati.gov.it/sites/default/files/pbz-organization-logo-horizontal_1",
        "name": "group/pab-rip-sanit",
        "created": "2017-02-22T17:50:57+01:00",
        "type": "organization"
      }
    ],
    "extras": [
      {
        "key": "",
        "value": ""
      }
    ],
    "_catalog_parent_name": "Open Data Alto Adige",
    "_catalog_source_url": "http://dati.retecivica.bz.it/api/3/action/package_list"
  }
}
marciuz commented 7 years ago

Sembra che il problema sia presente su Chrome, non su Firefox e IE 11 (che interpretano correttamente la risorsa), mentre Safari effettua invece il download del file. Fondamentalmente il problema è derivante dall'assenza dell'estensione nel nome del file.

Il problema può essere risolto dal modulo apache mod_mime_magic, ma va fatta una valutazione costi/benefici tra l'impatto del caricare un modulo apache rispetto alla rilevanza della issue.

Tu in quale contesto hai rilevato il problema?

grazie

aborruso commented 7 years ago

@marciuz mi dispiace vederti lavorare dopo cena :)

Stavo provando a fare una minigriglia live che pescava dalle API, che affiancava tutti i loghi delle organizzazioni, che avrei voluto usare al click per fare poi altre chiamate. Vedendo che non funzionava su chrome, mi sono fermato