aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url.c
Commit message (Collapse)AuthorAgeFilesLines
* zero out passwd/user/host before freeing them.Not Zed2004-01-291-0/+6
| | | | | | | | | 2004-01-29 Not Zed <NotZed@Ximian.com> * camel-url.c (camel_url_free): zero out passwd/user/host before freeing them. svn path=/trunk/; revision=24509
* encode the address before sending it out, rather than using the raw/utf8Not Zed2003-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-12-09 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_send_to): encode the address before sending it out, rather than using the raw/utf8 version. * camel-internet-address.c (camel_internet_address_encode_address): check for quoting the local part of the address before outputting it. (cia_encode_addrspec): quote local part if need be. (camel_internet_address_encode_address): make folding optional based on whether inlen is null or not. * camel-mime-utils.[ch]: rename is_* to camel_mime_is_* and export the type functions. 2003-12-08 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-utils.c (imap_atom_specials): add } to the atom specials list. This isn't correct, but some busted servers expect it. Bug #50728. 2003-12-02 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-folder.c (local_setv): remove some debug printfs. ** See bug #51576. * camel-url.c (camel_url_decode): robustify url decoding for bad input, addresses a crash. svn path=/trunk/; revision=23676
* #include camel-file-utils.h for camel_read()Dan Winship2003-07-231-0/+1
| | | | | | | | | | | | | | * camel-block-file.c: #include camel-file-utils.h for camel_read() * camel-uid-cache.c (camel_uid_cache_save): Remove unused variable and label. * camel-url.c: #include camel-string-utils.h for camel_strdown * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Cast an (unsigned char *) to (char *) to fix a warning svn path=/trunk/; revision=21902
* Updated for string-utils namespace changes.Jeffrey Stedfast2003-07-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-07 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (camel_session_init): Updated for string-utils namespace changes. * camel-provider.c: Updated for string-utils namespace changes. * camel-mime-part.c (init_header_name_table): Updated for string-utils namespace changes. * camel-mime-message.c (camel_mime_message_class_init): Updated for string-utils namespace changes. (camel_mime_message_init): Same. * camel-mime-filter-enriched.c (camel_mime_filter_enriched_class_init): Updated for string-utils namespace changes. * camel-folder-summary.c (camel_folder_summary_init): Updated for string-utils namespace changes. * camel-string-utils.[c,h]: Renamed from string-utils.[c,h] and also namespaced all functions. svn path=/trunk/; revision=21751
* ** Should fix #41629, #41448, et al.Not Zed2003-04-231-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-04-22 Not Zed <NotZed@Ximian.com> ** Should fix #41629, #41448, et al. * tests/folder/test10.c: a new torture test for object bag creation/unreffing. * camel-url.c (camel_url_copy): new function to copy a url. * camel-object.c (camel_object_bag_new): add arguments for key copy and key free functions. Fixed all callers. (camel_object_bag_destroy): fix a memleak, free the bag key. (camel_object_bag_get, camel_object_bag_reserve) (camel_object_bag_abort, save_bag, save_object): Make the key a void type, rather than char *. (camel_object_bag_add): As above, and also copy the key. (camel_object_bag_remove_unlocked): free the key using bag->free_key. * camel-session.c (register_provider) (camel_session_destroy_provider, get_service): Changed to use an object bag instead of a hash table for the service 'cache'. (service_cache_remove): Removed, no longer required. svn path=/trunk/; revision=20930
* Like camel_url_encode, but works directly on an existing GString.Dan Winship2003-03-271-73/+79
| | | | | | | | | | | | | | | | | | * camel-url.c (append_url_encoded): Like camel_url_encode, but works directly on an existing GString. (camel_url_to_string, output_param): Use it. (camel_url_encode): Likewise. Remove "escape_unsafe" arg since the "unsafe" chars are the ones that should *always* be escaped, and the places we were passing FALSE were wrong. (camel_url_decode): replace with a new version * camel-file-utils.c (camel_file_util_safe_filename): Remove extra arg to camel_url_encode. * tests/misc/url.c (main): Add tests of basic URL parsing and unparsing svn path=/trunk/; revision=20545
* s/g_strncasecmp/strncasecmp/gJeffrey Stedfast2003-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-03-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_next_word): s/g_strncasecmp/strncasecmp/g * camel-iconv.c: Updated to be an exact copy of e-iconv (except names changed). We don't use this yet, but we may in the future. * camel-url.c (camel_url_new_with_base): Here too. * camel-sasl-kerberos4.c (krb4_challenge): Use camel_strdown() here instead of g_strdown() since the latter has been deprecated. * providers/imap/camel-imap-utils.c (imap_parse_body): Use camel_strdown() since g_ascii_strdown() does not do what we thought. * providers/imap/camel-imap-store.c: s/strstrcase/camel_strstrcase/g * providers/imap/camel-imap-folder.c (do_append): s/strstrcase/camel_strstrcase/ (handle_copyuid): Same. * string-utils.c (camel_strdown): New function because the g_ascii_strdown interface sucks. (camel_strstrcase): Renamed from strstrcase. svn path=/trunk/; revision=20213
* Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated.Jeffrey Stedfast2003-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-02-04 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_body): Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated. (imap_parse_body): Same. * providers/imap/camel-imap-folder.c (decode_internaldate): Use strncasecmp() here too. (parse_fetch_response): And here. (camel_imap_folder_selected): Here too. * providers/imap/camel-imap-utils.c (imap_namespace_decode): Use strncasecmp() instead of g_strncasecmp() because the latter is deprecated. * providers/imap/camel-imap-store.c (imap_get_capability): Again here. (hash_folder_name): Here too. (compare_folder_name): And here. (get_folder_online): Again. (get_folder_offline): And again. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Same as below again. * providers/imap/camel-imap-command.c (camel_imap_response_free): Same as below. * providers/smtp/camel-smtp-transport.c (smtp_data): Use strcasecmp() because g_strcasecmp() is deprecated. * camel-url.c (camel_url_new_with_base): Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated. 2003-01-28 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-gssapi.c (gssapi_challenge): Pass in some default flags to gss_init_sec_context() (these default flags are defined as a MUST in rfc1964). svn path=/trunk/; revision=19748
* Replace calls to g_string_sprintfa() with g_string_append_printf() sinceJeffrey Stedfast2002-12-181-16/+18
| | | | | | | | | | | | | | 2002-12-17 Jeffrey Stedfast <fejj@ximian.com> * camel-url.c: Replace calls to g_string_sprintfa() with g_string_append_printf() since the former seems to have been deprecated. * camel-service.c: Same. * camel-mime-utils.c: Here too. svn path=/trunk/; revision=19153
* Fixing the license text.Ettore Perazzoli2001-10-281-1/+0
| | | | svn path=/trunk/; revision=14212
* Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-271-2/+2
| | | | | | (instead of version 2 or any later version). svn path=/trunk/; revision=14190
* General cleanup of camel debug printfs.92001-09-191-1/+1
| | | | | | | | | | | | | | | | | 2001-09-19 <NotZed@Ximian.com> * General cleanup of camel debug printfs. * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if the error indicates file locking isn't supported on this filesystem. Still return a warning just incase (if its the first time). Might fix a lot of reported bugs. * providers/local/camel-spool-store.c (get_folder_info): Dont include the empty // host part in the uri. This 'breaks' the service lookup. svn path=/trunk/; revision=12973
* Use g_datalist_set_data_full so that the data will be free'd when we clearJeffrey Stedfast2001-09-151-1/+1
| | | | | | | | | 2001-09-14 Jeffrey Stedfast <fejj@ximian.com> * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full so that the data will be free'd when we clear the list. svn path=/trunk/; revision=12838
* Allow the url to be NULL just like the libc free convention.Jeffrey Stedfast2001-07-271-13/+13
| | | | | | | | | 2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * camel-url.c (camel_url_free): Allow the url to be NULL just like the libc free convention. svn path=/trunk/; revision=11437
* constify argsDan Winship2001-06-271-1/+2
| | | | | | * camel-url.c (camel_url_encode): constify args svn path=/trunk/; revision=10501
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-1/+1
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* Plug leaks.Dan Winship2001-04-141-0/+1
| | | | | | | | | | | | | | | | * camel-object.c (camel_object_hook_event): * camel-uid-cache.c (camel_uid_cache_get_new_uids): * camel-url.c (camel_url_new_with_base): Plug leaks. * camel-remote-store.c (camel_remote_store_init): Don't re-initialize the folders hash table. * providers/imap/camel-imap-store.c (imap_disconnect): Free authtypes since they'll be re-read on re-connect. (get_folder_info): Free folderinfos that we're discarding from the list. svn path=/trunk/; revision=9302
* Plug memory leaks.Dan Winship2001-04-131-0/+1
| | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_remove): * camel-url.c (camel_url_to_string): Plug memory leaks. svn path=/trunk/; revision=9271
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-0/+3
| | | | svn path=/trunk/; revision=9024
* change "gboolean show_passwd" to "guint32 flags".Dan Winship2001-03-301-4/+4
| | | | | | | | | | | | | | | | | | * camel-url.c (camel_url_to_string): change "gboolean show_passwd" to "guint32 flags". * tests/misc/url.c (main): Update calls to camel_url_to_string * providers/imap/camel-imap-store.c (construct): Call camel_url_to_string with flags to hide password, authtype, and params to create the base_url. (etc): Update for the fact that the base_url no longer has the "/" at the end. * camel-service.c (construct): Update calls to camel_url_to_string (pass CAMEL_URL_HIDE_PASSWORD) svn path=/trunk/; revision=9014
* Fix parsing of params. (output_param): And unparsing...Dan Winship2001-03-271-2/+7
| | | | | | | * camel-url.c (camel_url_new_with_base): Fix parsing of params. (output_param): And unparsing... svn path=/trunk/; revision=8967
* Add missing accessor.Dan Winship2001-03-261-0/+6
| | | | | | * camel-url.c (camel_url_get_param): Add missing accessor. svn path=/trunk/; revision=8943
* eh, changed my mind, put the exception back in camel_url_new()Dan Winship2001-03-261-1/+6
| | | | svn path=/trunk/; revision=8934
* New URL parser with full RFC1808 relative URL support. Yum.Dan Winship2001-03-261-183/+342
| | | | | | | | | | | | | | | | * camel-url.c (camel_url_new_with_base): New URL parser with full RFC1808 relative URL support. Yum. (camel_url_new): Wrapper around camel_url_new_with_base now. Removed the CamelException since no one ever used it... * tests/Makefile.am: add misc subdir * tests/misc/url.c: relative URL test cases from RFC 1808 * camel-session.c (camel_session_get_service): Update camel_url_new call. svn path=/trunk/; revision=8933
* Assert url_string != NULL.Peter Williams2001-03-011-1/+3
| | | | | | | | 2001-03-01 Peter Williams <peterw@ximian.com> * camel-url.c (camel_url_new): Assert url_string != NULL. svn path=/trunk/; revision=8439
* Kill off a long-hated Camel kludge: "empty" URLs andDan Winship2001-01-101-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | query_auth_types_generic. * camel-url.c: Remove "empty" from CamelURL. (camel_url_new): No longer set it. (camel_url_to_string): Treat "" as equivalent to NULL for authmech. (Unrelated change, but it simplifies some stuff with the new config dialog.) * camel-service.c (camel_service_new): Remove url->empty check: if the URL isn't valid, we don't create the service. (camel_service_query_auth_types): No longer need to switch between generic and connected variants. * providers/smtp/camel-smtp-transport.c (query_auth_types): * providers/pop3/camel-pop3-store.c (query_auth_types): * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): * providers/imap/camel-imap-store.c (query_auth_types): * camel-remote-store.c (remote_query_auth_types): Remove generic version, rename connected version. svn path=/trunk/; revision=7327
* Undo my incorrect fix - I misunderstood danw - sorry!Jeffrey Stedfast2000-11-041-26/+4
| | | | | | | | | 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com> * camel-url.c: Undo my incorrect fix - I misunderstood danw - sorry! svn path=/trunk/; revision=6386
* If show_pass, then base64 the password before writing it to the outputJeffrey Stedfast2000-11-041-6/+34
| | | | | | | | | | | 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com> * camel-url.c (camel_url_to_string): If show_pass, then base64 the password before writing it to the output string. (camel_url_new): Assume password has been base64 encoded and decode accordingly. svn path=/trunk/; revision=6374
* lots of i18n fixesDan Winship2000-10-241-4/+5
| | | | svn path=/trunk/; revision=6143
* Only retry another uid if we had a name clash, otherwise fail.Not Zed2000-08-081-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-07 Not Zed <NotZed@HelixCode.com> * providers/mh/camel-mh-folder.c (mh_append_message): Only retry another uid if we had a name clash, otherwise fail. 2000-08-04 Not Zed <NotZed@HelixCode.com> * camel-url.c (camel_url_set_protocol): (camel_url_set_host): (camel_url_set_path): (camel_url_set_port): Url editing functions. 2000-08-02 Not Zed <NotZed@HelixCode.com> * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge from the end, so the index isn't messed up when you remove a message. * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug where it would never open an output file/uid. * providers/mbox/camel-mbox-store.c (rename_folder): Implementation for mbox as well. * camel-store.c (camel_store_rename_folder): New method to rename folders. (rename_folder): Default implementation. * providers/mh/camel-mh-store.c (delete_folder): Implement this. (rename_folder): Implement a rename operation. svn path=/trunk/; revision=4590
* If the path doesn't begin with a / and there is a host, prepend a / to theJeffrey Stedfast2000-07-281-1/+2
| | | | | | | | | 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com> * camel-url.c (camel_url_to_string): If the path doesn't begin with a / and there is a host, prepend a / to the path. svn path=/trunk/; revision=4403
* Should now always prepend a '/' before the path if it doesn't alreadyJeffrey Stedfast2000-07-261-14/+16
| | | | | | | | | | | 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com> * camel-url.c (camel_url_to_string): Should now always prepend a '/' before the path if it doesn't already exist. * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings svn path=/trunk/; revision=4346
* UpdatedJeffrey Stedfast2000-06-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com> * providers/sendmail/camel-sendmail-provider.c: * providers/vee/camel-vee-provider.c: * providers/smtp/camel-smtp-provider.c: * providers/mbox/camel-mbox-provider.c: * providers/pop3/camel-pop3-provider.c: * providers/imap/camel-imap-provider.c: Updated * camel-session.c: Moved service_cache hash table into the providers. (service_cache_remove): Updated. (camel_session_get_service): Updated. * camel-url.c (camel_url_hash): Took out the hashing of url->passwd. We don't want this anymore. * providers/imap/camel-imap-folder.c (imap_init): Took out references to 'namespace' (camel_imap_folder_init): Same * providers/imap/camel-imap-folder.h: No more namespace. We are instead going to use url->path as the namespace. svn path=/trunk/; revision=3700
* Only fetch the summary if the folder summary doesn't already exist. WhenJeffrey Stedfast2000-06-211-10/+7
| | | | | | | | | | | | | | | | | | | | | 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-folder.c (imap_get_summary): Only fetch the summary if the folder summary doesn't already exist. When the summary *does* exist, start fetching from 1, not 0. (imap_free_summary): Don't do anything here. (imap_finalize): Free the summary here instead of in imap_free_summary(). * camel-url.c (check_equal): No need to check s1 if s2 is NULL (camel_url_equal): Don't check the passwd component of the url. and in mail/component-factory.c (create_imap_storage): removal of debug statements mail/folder-browser.c (folder_browser_load_folder): improved imap service parser svn path=/trunk/; revision=3649
* Init filter_from to NULL, for exception case. (mbox_get_message_by_uid):Not Zed2000-05-311-2/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-30 Not Zed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init filter_from to NULL, for exception case. (mbox_get_message_by_uid): Cast off_t to long int for diagnostics. * camel-url.c (camel_url_hash): Hash funciton for using camel url's as hash keys. (camel_url_equal): equal function for same. * camel-session.c (camel_session_finalise): Free cached services. (camel_session_init): Init service cache. (service_cache_remove): destroy callback to remove a service from the cache. * camel-store.c (get_folder_internal): Remove the extra ref of the folder. That seems the right behaviour ...? (camel_store_get_type): Doh, actually call store init, so the cache works. (cache_folder): strdup the folder name! no wonder it never found it again. svn path=/trunk/; revision=3298
* New function to replace camel_provider_scan. Returns a list of either (a)Dan Winship2000-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * camel-session.c (camel_session_list_providers): New function to replace camel_provider_scan. Returns a list of either (a) all currently-loaded providers, or (b) all available providers. * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that it contains only a protocol). * camel-service.c (camel_service_query_auth_types): Make this take a CamelException (since it may have to try to connect to the server, and it might not able to.) * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP) support. This is mostly so I have two kinds of authmech to play with instead of just one. (But it does actually work.) * providers/smtp/camel-smtp-transport.c (query_auth_types): update for prototype change, but disable the functionality, since it doesn't really support any auth types yet. (camel_smtp_transport_get_type): add an object init function to set the service url_flags. svn path=/trunk/; revision=2797
* expose these routines.Dan Winship2000-04-281-24/+33
| | | | | | | * camel-url.[ch] (camel_url_encode, camel_url_decode): expose these routines. svn path=/trunk/; revision=2661
* Add code to encode and decode %-escapes in URLs, and do some additionalDan Winship2000-04-181-21/+114
| | | | | | | | | | 2000-04-17 Dan Winship <danw@helixcode.com> * camel-url.c: Add code to encode and decode %-escapes in URLs, and do some additional correctness-checking on URL syntax. From Tiago Antào with modifications by me. svn path=/trunk/; revision=2474
* the URL RFC says the port must be numeric, so we don't want to doDan Winship2000-04-061-0/+188
* g_url_new really wanted to take a CamelException. So, rename Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new taking an exception), and url-util.[ch] to camel-url.[ch]. Also force url->port to be numeric and remove camel_service_getport. (I was confused before: the URL RFC says the port must be numeric, so we don't want to do getportbyname.) svn path=/trunk/; revision=2300