소스 검색

smarter content type detection

bubble
Tony Tam 10 년 전
부모
커밋
7457b2027d
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +5
    -1
      src/main/coffeescript/view/OperationView.coffee

+ 5
- 1
src/main/coffeescript/view/OperationView.coffee 파일 보기

@@ -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")


불러오는 중...
취소
저장