urlmatch.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef URLMATCH_H_INCLUDED
  2. #define URLMATCH_H_INCLUDED
  3. /*********************************************************************
  4. *
  5. * File : $Source: /cvsroot/ijbswa/current/urlmatch.h,v $
  6. *
  7. * Purpose : Declares functions to match URLs against URL
  8. * patterns.
  9. *
  10. * Copyright : Written by and Copyright (C) 2001-2002, 2006 the
  11. * Privoxy team. https://www.privoxy.org/
  12. *
  13. * Based on the Internet Junkbuster originally written
  14. * by and Copyright (C) 1997 Anonymous Coders and
  15. * Junkbusters Corporation. http://www.junkbusters.com
  16. *
  17. * This program is free software; you can redistribute it
  18. * and/or modify it under the terms of the GNU General
  19. * Public License as published by the Free Software
  20. * Foundation; either version 2 of the License, or (at
  21. * your option) any later version.
  22. *
  23. * This program is distributed in the hope that it will
  24. * be useful, but WITHOUT ANY WARRANTY; without even the
  25. * implied warranty of MERCHANTABILITY or FITNESS FOR A
  26. * PARTICULAR PURPOSE. See the GNU General Public
  27. * License for more details.
  28. *
  29. * The GNU General Public License should be included with
  30. * this file. If not, you can view it at
  31. * http://www.gnu.org/copyleft/gpl.html
  32. * or write to the Free Software Foundation, Inc., 59
  33. * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  34. *
  35. *********************************************************************/
  36. #include "project.h"
  37. extern void free_http_request(struct http_request *http);
  38. extern jb_err init_domain_components(struct http_request *http);
  39. extern jb_err parse_http_request(const char *req, struct http_request *http);
  40. extern jb_err parse_http_url(const char *url,
  41. struct http_request *http,
  42. int require_protocol);
  43. extern int url_requires_percent_encoding(const char *url);
  44. #define REQUIRE_PROTOCOL 1
  45. extern int url_match(const struct pattern_spec *pattern,
  46. const struct http_request *http);
  47. extern jb_err create_pattern_spec(struct pattern_spec *url, char *buf);
  48. extern void free_pattern_spec(struct pattern_spec *url);
  49. extern int match_portlist(const char *portlist, int port);
  50. extern jb_err parse_forwarder_address(char *address, char **hostname, int *port,
  51. char **username, char **password);
  52. #endif /* ndef URLMATCH_H_INCLUDED */
  53. /*
  54. Local Variables:
  55. tab-width: 3
  56. end:
  57. */