File: url.h

package info (click to toggle)
zsync 0.6.2-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,396 kB
  • ctags: 1,052
  • sloc: ansic: 9,015; sh: 3,800; makefile: 42
file content (27 lines) | stat: -rw-r--r-- 1,163 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 *   zsync - client side rsync over http
 *   Copyright (C) 2004,2005,2009 Colin Phipps <cph@moria.org.uk>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the Artistic License v2 (see the accompanying 
 *   file COPYING for the full license terms), or, at your option, any later 
 *   version of the same license.
 *
 *   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
 *   COPYING file for details.
 */

extern const char http_scheme[];

/* Given an HTTP URL, return the path path of the URL as the return value, and
 * return the hostname in the provided buffer (hostn, length hnlen)
 * and, if present, return a (malloced) string buffer containing the port string.
 * Or return NULL if not HTTP or other parsing failure.
 */
char* get_http_host_port(const char* url, char* hostn, int hnlen, char** port);

char* __attribute__((pure)) make_url_absolute(const char* base, const char* url);

int __attribute__((pure)) is_url_absolute(const char* url);