FreeRDP
http.c File Reference
#include <errno.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/string.h>
#include <freerdp/log.h>
#include "http.h"

Macros

#define TAG   FREERDP_TAG("core.gateway.http")
 
#define RESPONSE_SIZE_LIMIT   64 * 1024 * 1024
 

Functions

static char * string_strnstr (char *str1, const char *str2, size_t slen)
 
static BOOL strings_equals_nocase (const void *obj1, const void *obj2)
 
HttpContext * http_context_new (void)
 
BOOL http_context_set_method (HttpContext *context, const char *Method)
 
const char * http_context_get_uri (HttpContext *context)
 
BOOL http_context_set_uri (HttpContext *context, const char *URI)
 
BOOL http_context_set_user_agent (HttpContext *context, const char *UserAgent)
 
BOOL http_context_set_host (HttpContext *context, const char *Host)
 
BOOL http_context_set_accept (HttpContext *context, const char *Accept)
 
BOOL http_context_set_cache_control (HttpContext *context, const char *CacheControl)
 
BOOL http_context_set_connection (HttpContext *context, const char *Connection)
 
BOOL http_context_set_pragma (HttpContext *context, const char *Pragma)
 
BOOL http_context_set_rdg_connection_id (HttpContext *context, const char *RdgConnectionId)
 
BOOL http_context_set_rdg_auth_scheme (HttpContext *context, const char *RdgAuthScheme)
 
void http_context_free (HttpContext *context)
 
BOOL http_request_set_method (HttpRequest *request, const char *Method)
 
BOOL http_request_set_uri (HttpRequest *request, const char *URI)
 
BOOL http_request_set_auth_scheme (HttpRequest *request, const char *AuthScheme)
 
BOOL http_request_set_auth_param (HttpRequest *request, const char *AuthParam)
 
BOOL http_request_set_transfer_encoding (HttpRequest *request, const char *TransferEncoding)
 
static BOOL http_encode_print (wStream *s, const char *fmt,...)
 
static BOOL http_encode_body_line (wStream *s, const char *param, const char *value)
 
static BOOL http_encode_content_length_line (wStream *s, size_t ContentLength)
 
static BOOL http_encode_header_line (wStream *s, const char *Method, const char *URI)
 
static BOOL http_encode_authorization_line (wStream *s, const char *AuthScheme, const char *AuthParam)
 
wStream * http_request_write (HttpContext *context, HttpRequest *request)
 
HttpRequest * http_request_new (void)
 
void http_request_free (HttpRequest *request)
 
static BOOL http_response_parse_header_status_line (HttpResponse *response, const char *status_line)
 
static BOOL http_response_parse_header_field (HttpResponse *response, const char *name, const char *value)
 
static BOOL http_response_parse_header (HttpResponse *response)
 
BOOL http_response_print (HttpResponse *response)
 
static BOOL http_use_content_length (const char *cur)
 
HttpResponse * http_response_recv (rdpTls *tls, BOOL readContentLength)
 
HttpResponse * http_response_new (void)
 
void http_response_free (HttpResponse *response)
 
const char * http_request_get_uri (HttpRequest *request)
 
SSIZE_T http_request_get_content_length (HttpRequest *request)
 
BOOL http_request_set_content_length (HttpRequest *request, size_t length)
 
long http_response_get_status_code (HttpResponse *response)
 
SSIZE_T http_response_get_body_length (HttpResponse *response)
 
const char * http_response_get_auth_token (HttpResponse *respone, const char *method)
 

Macro Definition Documentation

#define RESPONSE_SIZE_LIMIT   64 * 1024 * 1024
#define TAG   FREERDP_TAG("core.gateway.http")

FreeRDP: A Remote Desktop Protocol Implementation Hypertext Transfer Protocol (HTTP)

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

void http_context_free ( HttpContext *  context)

Here is the caller graph for this function:

const char* http_context_get_uri ( HttpContext *  context)

Here is the caller graph for this function:

HttpContext* http_context_new ( void  )

Here is the caller graph for this function:

BOOL http_context_set_accept ( HttpContext *  context,
const char *  Accept 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_cache_control ( HttpContext *  context,
const char *  CacheControl 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_connection ( HttpContext *  context,
const char *  Connection 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_host ( HttpContext *  context,
const char *  Host 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_method ( HttpContext *  context,
const char *  Method 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_pragma ( HttpContext *  context,
const char *  Pragma 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_rdg_auth_scheme ( HttpContext *  context,
const char *  RdgAuthScheme 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_rdg_connection_id ( HttpContext *  context,
const char *  RdgConnectionId 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_uri ( HttpContext *  context,
const char *  URI 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_context_set_user_agent ( HttpContext *  context,
const char *  UserAgent 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_encode_authorization_line ( wStream *  s,
const char *  AuthScheme,
const char *  AuthParam 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_encode_body_line ( wStream *  s,
const char *  param,
const char *  value 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_encode_content_length_line ( wStream *  s,
size_t  ContentLength 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_encode_header_line ( wStream *  s,
const char *  Method,
const char *  URI 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_encode_print ( wStream *  s,
const char *  fmt,
  ... 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void http_request_free ( HttpRequest *  request)

Here is the caller graph for this function:

SSIZE_T http_request_get_content_length ( HttpRequest *  request)
const char* http_request_get_uri ( HttpRequest *  request)
HttpRequest* http_request_new ( void  )

Here is the caller graph for this function:

BOOL http_request_set_auth_param ( HttpRequest *  request,
const char *  AuthParam 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_request_set_auth_scheme ( HttpRequest *  request,
const char *  AuthScheme 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_request_set_content_length ( HttpRequest *  request,
size_t  length 
)

Here is the caller graph for this function:

BOOL http_request_set_method ( HttpRequest *  request,
const char *  Method 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_request_set_transfer_encoding ( HttpRequest *  request,
const char *  TransferEncoding 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL http_request_set_uri ( HttpRequest *  request,
const char *  URI 
)

Here is the call graph for this function:

Here is the caller graph for this function:

wStream* http_request_write ( HttpContext *  context,
HttpRequest *  request 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void http_response_free ( HttpResponse *  response)

Here is the call graph for this function:

Here is the caller graph for this function:

const char* http_response_get_auth_token ( HttpResponse *  respone,
const char *  method 
)

Here is the call graph for this function:

Here is the caller graph for this function:

SSIZE_T http_response_get_body_length ( HttpResponse *  response)

Here is the caller graph for this function:

long http_response_get_status_code ( HttpResponse *  response)

Here is the caller graph for this function:

HttpResponse* http_response_new ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_response_parse_header ( HttpResponse *  response)
static

name end_of_header | | v v <header name>=""> : <header value>=""> ^ ^ | | colon_pos value

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_response_parse_header_field ( HttpResponse *  response,
const char *  name,
const char *  value 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_response_parse_header_status_line ( HttpResponse *  response,
const char *  status_line 
)
static

Here is the caller graph for this function:

BOOL http_response_print ( HttpResponse *  response)

Here is the caller graph for this function:

HttpResponse* http_response_recv ( rdpTls *  tls,
BOOL  readContentLength 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL http_use_content_length ( const char *  cur)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static char* string_strnstr ( char *  str1,
const char *  str2,
size_t  slen 
)
static

Here is the caller graph for this function:

static BOOL strings_equals_nocase ( const void obj1,
const void obj2 
)
static

Here is the call graph for this function:

Here is the caller graph for this function: