diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-11-10 16:08:22 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-11-10 16:08:22 +0000 |
| commit | 82b80c33d8bb5c12ed571971666b396b3433cb4d (patch) | |
| tree | 71b89e4fce6b62b5c5205d63c92eb87d431ca7aa /src | |
| parent | bb8481e7520043e1c29636bb295bdd1a3b0b0449 (diff) | |
2008-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that metalink file is not processed if
Content-Type field has a paramter.
* src/HttpResponse.cc
* src/HttpResponse.h
* test/HttpResponseTest.cc
Diffstat (limited to 'src')
| -rw-r--r-- | src/HttpResponse.cc | 3 | ||||
| -rw-r--r-- | src/HttpResponse.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc index 715effce..71ed71eb 100644 --- a/src/HttpResponse.cc +++ b/src/HttpResponse.cc @@ -212,7 +212,8 @@ std::string HttpResponse::getContentType() const if(httpHeader.isNull()) { return A2STR::NIL; } else { - return httpHeader->getFirst(HttpHeader::CONTENT_TYPE); + return + Util::split(httpHeader->getFirst(HttpHeader::CONTENT_TYPE), ";").first; } } diff --git a/src/HttpResponse.h b/src/HttpResponse.h index b12a6f44..78272bbb 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -97,6 +97,7 @@ public: uint64_t getEntityLength() const; + // Returns type "/" subtype. The parameter is removed. std::string getContentType() const; void setHttpHeader(const SharedHandle<HttpHeader>& httpHeader); |
