コード例 #1
0
ファイル: HTTPRequest.cpp プロジェクト: Josok/EasyDarwin
void HTTPRequest::AppendDateField()
{
    Assert(OSThread::GetCurrent() != NULL);
    DateBuffer* theDateBuffer = OSThread::GetCurrent()->GetDateBuffer();
    theDateBuffer->InexactUpdate(); // Update the date buffer to the current date & time
    StrPtrLen theDate(theDateBuffer->GetDateBuffer(), DateBuffer::kDateBufferLen);
  
    // Append date
    this->AppendResponseHeader(httpDateHeader, &theDate);
}
コード例 #2
0
ファイル: HTTPRequest.cpp プロジェクト: Josok/EasyDarwin
void HTTPRequest::AppendDateAndExpiresFields()
{
    Assert(OSThread::GetCurrent() != NULL);
    DateBuffer* theDateBuffer = OSThread::GetCurrent()->GetDateBuffer();
    theDateBuffer->InexactUpdate(); // Update the date buffer to the current date & time
    StrPtrLen theDate(theDateBuffer->GetDateBuffer(), DateBuffer::kDateBufferLen);
  
    // Append dates, and have this response expire immediately
    this->AppendResponseHeader(httpDateHeader, &theDate);
    this->AppendResponseHeader(httpExpiresHeader, &theDate);
}
コード例 #3
0
void RTSPRequestInterface::AppendDateAndExpires()
{
    if (!fStandardHeadersWritten)
        this->WriteStandardHeaders();

    Assert(OSThread::GetCurrent() != NULL);
    DateBuffer* theDateBuffer = OSThread::GetCurrent()->GetDateBuffer();
    theDateBuffer->InexactUpdate(); // Update the date buffer to the current date & time
    StrPtrLen theDate(theDateBuffer->GetDateBuffer(), DateBuffer::kDateBufferLen);
    
    // Append dates, and have this response expire immediately
    this->AppendHeader(qtssDateHeader, &theDate);
    this->AppendHeader(qtssExpiresHeader, &theDate);
}