taskrambler  0.1.9
Web server and task management solution.
has_valid_version.c File Reference
#include <string.h>
#include "http/message.h"
#include "utils/http.h"
+ Include dependency graph for has_valid_version.c:

Go to the source code of this file.

Functions

int httpMessageHasValidVersion (HttpMessage this)
 

Detailed Description

Author
Georg Hopp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file has_valid_version.c.

Function Documentation

int httpMessageHasValidVersion ( HttpMessage  this)

Definition at line 29 of file has_valid_version.c.

References httpMessageGetVersion(), and isHttpVersion().

30 {
31  int major;
32  int minor;
33 
34  if (! isHttpVersion(this->version, strlen(this->version)))
35  return 0;
36 
37  if (0 > httpMessageGetVersion(this, &major, &minor))
38  return 0;
39 
40  if (1 != major)
41  return 0;
42 
43  if (0 > minor || 1 < minor)
44  return 0;
45 
46  return 1;
47 }
int httpMessageGetVersion(HttpMessage, int *, int *)
Definition: get_version.c:29
char isHttpVersion(const char *, size_t)
Definition: utils/http.c:112

+ Here is the call graph for this function: