Procházet zdrojové kódy

smarter content type detection

bubble
Tony Tam před 10 roky
rodič
revize
7457b2027d
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. +5
    -1
      src/main/coffeescript/view/OperationView.coffee

+ 5
- 1
src/main/coffeescript/view/OperationView.coffee Zobrazit soubor

@@ -376,7 +376,11 @@ class OperationView extends Backbone.View
headers = response.headers

# if server is nice, and sends content-type back, we can use it
contentType = if headers && headers["Content-Type"] then headers["Content-Type"].split(";")[0].trim() else null
contentType = null
if headers
contentType = headers["Content-Type"] or headers["content-type"]
if contentType
contentType = contentType.split(";")[0].trim()

if !content
code = $('<code />').text("no content")


Načítá se…
Zrušit
Uložit