From 2aa8e01836da65fca6b19843610ec438eeca4b4a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 6 Nov 2013 23:40:59 +0900 Subject: [PATCH] Fix typo --- src/HttpResponse.cc | 2 +- src/HttpResponse.h | 2 +- src/HttpResponseCommand.cc | 2 +- test/HttpResponseTest.cc | 24 ++++++++++++------------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc index c4562532..7267e51a 100644 --- a/src/HttpResponse.cc +++ b/src/HttpResponse.cc @@ -117,7 +117,7 @@ void HttpResponse::validateResponse() const } } -std::string HttpResponse::determinFilename() const +std::string HttpResponse::determineFilename() const { std::string contentDisposition = util::getContentDispositionFilename( httpHeader_->find(HttpHeader::CONTENT_DISPOSITION)); diff --git a/src/HttpResponse.h b/src/HttpResponse.h index c24090f6..fabb6f7d 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -70,7 +70,7 @@ public: * this function returns the filename from it. * If it is not there, returns the part of filename from the request URL. */ - std::string determinFilename() const; + std::string determineFilename() const; void retrieveCookie(); diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index e0452ba2..3bda5e86 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -254,7 +254,7 @@ bool HttpResponseCommand::executeInternal() fe->setLength(totalLength); if (fe->getPath().empty()) { fe->setPath(util::createSafePath(getOption()->get(PREF_DIR), - httpResponse->determinFilename())); + httpResponse->determineFilename())); } fe->setContentType(httpResponse->getContentType()); grp->preDownloadProcessing(); diff --git a/test/HttpResponseTest.cc b/test/HttpResponseTest.cc index 6bec45db..3e5ec6ef 100644 --- a/test/HttpResponseTest.cc +++ b/test/HttpResponseTest.cc @@ -32,9 +32,9 @@ class HttpResponseTest : public CppUnit::TestFixture { //CPPUNIT_TEST(testGetContentLength_range); CPPUNIT_TEST(testGetEntityLength); CPPUNIT_TEST(testGetContentType); - CPPUNIT_TEST(testDeterminFilename_without_ContentDisposition); - CPPUNIT_TEST(testDeterminFilename_with_ContentDisposition_zero_length); - CPPUNIT_TEST(testDeterminFilename_with_ContentDisposition); + CPPUNIT_TEST(testDetermineFilename_without_ContentDisposition); + CPPUNIT_TEST(testDetermineFilename_with_ContentDisposition_zero_length); + CPPUNIT_TEST(testDetermineFilename_with_ContentDisposition); CPPUNIT_TEST(testGetRedirectURI_without_Location); CPPUNIT_TEST(testGetRedirectURI_with_Location); CPPUNIT_TEST(testIsRedirect); @@ -67,9 +67,9 @@ public: void testGetContentLength_contentLength(); void testGetEntityLength(); void testGetContentType(); - void testDeterminFilename_without_ContentDisposition(); - void testDeterminFilename_with_ContentDisposition_zero_length(); - void testDeterminFilename_with_ContentDisposition(); + void testDetermineFilename_without_ContentDisposition(); + void testDetermineFilename_with_ContentDisposition_zero_length(); + void testDetermineFilename_with_ContentDisposition(); void testGetRedirectURI_without_Location(); void testGetRedirectURI_with_Location(); void testIsRedirect(); @@ -143,7 +143,7 @@ void HttpResponseTest::testGetContentType() httpResponse.getContentType()); } -void HttpResponseTest::testDeterminFilename_without_ContentDisposition() +void HttpResponseTest::testDetermineFilename_without_ContentDisposition() { HttpResponse httpResponse; auto httpRequest = make_unique(); @@ -155,10 +155,10 @@ void HttpResponseTest::testDeterminFilename_without_ContentDisposition() httpResponse.setHttpRequest(std::move(httpRequest)); CPPUNIT_ASSERT_EQUAL(std::string("aria2-1.0.0.tar.bz2"), - httpResponse.determinFilename()); + httpResponse.determineFilename()); } -void HttpResponseTest::testDeterminFilename_with_ContentDisposition_zero_length +void HttpResponseTest::testDetermineFilename_with_ContentDisposition_zero_length () { HttpResponse httpResponse; @@ -173,10 +173,10 @@ void HttpResponseTest::testDeterminFilename_with_ContentDisposition_zero_length httpResponse.setHttpRequest(std::move(httpRequest)); CPPUNIT_ASSERT_EQUAL(std::string("aria2-1.0.0.tar.bz2"), - httpResponse.determinFilename()); + httpResponse.determineFilename()); } -void HttpResponseTest::testDeterminFilename_with_ContentDisposition() +void HttpResponseTest::testDetermineFilename_with_ContentDisposition() { HttpResponse httpResponse; auto httpHeader = make_unique(); @@ -191,7 +191,7 @@ void HttpResponseTest::testDeterminFilename_with_ContentDisposition() httpResponse.setHttpRequest(std::move(httpRequest)); CPPUNIT_ASSERT_EQUAL(std::string("aria2-current.tar.bz2"), - httpResponse.determinFilename()); + httpResponse.determineFilename()); } void HttpResponseTest::testGetRedirectURI_without_Location()