Skip to content

Commit

Permalink
Merge pull request #1681 from Red-F/post_refactor
Browse files Browse the repository at this point in the history
Fix CCurlFile::Get()
  • Loading branch information
jmarshallnz committed Oct 27, 2012
2 parents ed16a1e + 5a03f0b commit 599a248
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions xbmc/filesystem/CurlFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,18 +732,20 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)

bool CCurlFile::Post(const CStdString& strURL, const CStdString& strPostData, CStdString& strHTML)
{
return Service(strURL, strPostData, strHTML);
m_postdata = strPostData;
m_postdataset = true;
return Service(strURL, strHTML);
}

bool CCurlFile::Get(const CStdString& strURL, CStdString& strHTML)
{
return Service(strURL, "", strHTML);
m_postdata = "";
m_postdataset = false;
return Service(strURL, strHTML);
}

bool CCurlFile::Service(const CStdString& strURL, const CStdString& strPostData, CStdString& strHTML)
bool CCurlFile::Service(const CStdString& strURL, CStdString& strHTML)
{
m_postdata = strPostData;
m_postdataset = true;
if (Open(strURL))
{
if (ReadData(strHTML))
Expand Down
2 changes: 1 addition & 1 deletion xbmc/filesystem/CurlFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace XFILE
void SetCommonOptions(CReadState* state);
void SetRequestHeaders(CReadState* state);
void SetCorrectHeaders(CReadState* state);
bool Service(const CStdString& strURL, const CStdString& strPostData, CStdString& strHTML);
bool Service(const CStdString& strURL, CStdString& strHTML);

protected:
CReadState* m_state;
Expand Down

0 comments on commit 599a248

Please sign in to comment.