Steve Holme
afad1ce753
pop3: Re-factored the final POP3_AUTH constant
...
Changed the final POP3_AUTH constant to POP3_AUTH_FINAL for consistency
with the response function.
2013-02-27 21:20:11 +00:00
Steve Holme
13006f3de9
imap: Re-factored final IMAP_AUTHENTICATE constant
...
Changed the final IMAP_AUTHENTICATE constant to IMAP_AUTHENTICATE_FINAL
for consistency with the response function.
2013-02-27 21:19:48 +00:00
Steve Holme
1d86d813c3
imap: Updated the coding style of imap_state_servergreet_resp()
...
Updated the coding style, in this function, to be consistant with other
response functions rather then performing a hard return on failure.
2013-02-27 21:00:35 +00:00
Steve Holme
f53ed631b3
imap: Reversed the logic of the (un)successful tagged SELECT response
...
Reversed the logic of the unsuccessful vs successful tagged SELECT
response in imap_state_select_resp() to be more logical to read.
2013-02-27 20:53:34 +00:00
Steve Holme
5b3736b533
imap: Reversed the logic of the (un)successful tagged CAPABILITY response
...
Reversed the logic of the unsuccessful vs successful tagged CAPABILITY
response in imap_state_capability_resp() to be more logical to read.
2013-02-27 20:48:24 +00:00
Steve Holme
cce08581ac
imap: Corrected char* references with char *
...
Corrected char* references made in commit: 709b3506cd
.
2013-02-27 20:35:04 +00:00
Jiri Hruska
c368fbcb10
imap: Added processing of more than one response when sent in same packet
...
Added a loop to imap_statemach_act() in which Curl_pp_readresp() is
called until the cache is drained. Without this multiple responses
received in a single packet could result in a hang or delay.
2013-02-27 20:08:04 +00:00
Jiri Hruska
b644c47192
imap: Added skipping of SELECT command if already in the same mailbox
...
Added storage and checking of the last mailbox userd to prevent
unnecessary switching.
2013-02-27 20:08:02 +00:00
Jiri Hruska
d03aa16164
imap: Introduced the mailbox variable
...
Added the mailbox variable to the per-connection structure in
preparation for checking for an already selected mailbox.
2013-02-27 20:08:00 +00:00
Steve Holme
aa44ec62aa
email: Slight reordering of connection based variables
...
Reordered the state and ssl_done variables in order to provide more
consistency between the email protocols as well as for for an upcoming
change.
2013-02-26 23:15:16 +00:00
Steve Holme
05c03e7edd
imap: Tidied up comments for connection based variables
2013-02-26 23:07:37 +00:00
Steve Holme
f67bd1a344
DOCS: Added the IMAP UIDVALIDITY property to the CURLOPT_URL section
2013-02-26 22:22:26 +00:00
Jiri Hruska
a8eb059203
imap: Added verification of UIDVALIDITY mailbox attribute
...
Added support for checking the UIDVALIDITY, and aborting the request, if
it has been specified in the URL and the server response is different.
2013-02-26 22:09:21 +00:00
Jiri Hruska
59c71c7fc7
imap: Added support for parsing the UIDVALIDITY property
...
Added support for parsing the UIDVALIDITY property from the SELECT
response and storing it in the per-connection structure.
2013-02-26 22:09:19 +00:00
Jiri Hruska
58efa46a5d
imap: Introduced the mailbox_uidvalidity variable
...
Added the mailbox_uidvalidity variable to the per-connection structure
in preparation for checking the UIDVALIDITY mailbox attribute.
2013-02-26 22:09:18 +00:00
Steve Holme
acd22f05dd
imap: Corrected comment in imap_endofresp()
2013-02-26 20:40:22 +00:00
Steve Holme
ce9a0a6d65
imap: Corrected whitespace
2013-02-26 20:37:08 +00:00
Jiri Hruska
f92f341a3f
imap: Added filtering of CAPABILITY and FETCH untagged responses
...
Only responses that contain "CAPABILITY" and "FETCH", respectively,
will be sent to their response handler.
2013-02-26 20:35:41 +00:00
Jiri Hruska
91b2184e1b
imap: Added a helper function for upcoming untagged response filtering
...
RFC 3501 states that "the client MUST be prepared to accept any response
at all times" yet we assume anything received with "* " at the beginning
is the untagged response we want.
Introduced a helper function that checks whether the input looks like a
response to specified command, so that we may filter the ones we are
interested in according to the current state.
2013-02-26 20:23:13 +00:00
Jiri Hruska
1ffdc5058e
imap: Moved CAPABILITY response handling to imap_state_capability_resp()
...
Introduced similar handling to the FETCH responses, where even the
untagged data responses are handled by the response handler of the
individual state.
2013-02-26 19:51:16 +00:00
Linus Nielsen Feltzing
0ffefefe7f
Remove unused variable in smtp_state_data_resp()
2013-02-26 09:05:25 +01:00
Steve Holme
764b818934
email: Small tidy up following recent changes
2013-02-25 23:00:08 +00:00
Steve Holme
9d45391347
smtp: Removed bytecountp from the per-request structure
...
Removed this pointer to a downloaded bytes counter because it was set in
smtp_init() to point to the same variable the transfer functions keep
the count in (k->bytecount), effectively making the code in transfer.c
"*k->bytecountp = k->bytecount" a no-op.
2013-02-25 22:50:36 +00:00
Steve Holme
a390454728
pop3: Removed bytecountp from the per-request structure
...
Removed this pointer to a downloaded bytes counter because it was set in
pop3_init() to point to the same variable the transfer functions keep
the count in (k->bytecount), effectively making the code in transfer.c
"*k->bytecountp = k->bytecount" a no-op.
2013-02-25 22:43:45 +00:00
Jiri Hruska
005ad9e60d
imap: Removed bytecountp from the per-request structure
...
Removed this pointer to a downloaded bytes counter because it was set in
imap_init() to point to the same variable the transfer functions keep
the count in (k->bytecount), effectively making the code in transfer.c
"*k->bytecountp = k->bytecount" a no-op.
2013-02-25 22:05:20 +00:00
Jiri Hruska
a360944ed6
imap: Adjusted SELECT and FETCH function order
...
Moved imap_select() and imap_fetch() to be grouped with the other
perform functions.
2013-02-25 21:40:32 +00:00
Jiri Hruska
6f02209cc8
imap: Adjusted SELECT and FETCH state order in imap_statemach_act()
...
Exchanged the position of these states in the switch statements to
match the state enum, execution and function order.
2013-02-25 21:26:40 +00:00
Steve Holme
015ceb4706
imap: Minor tidy up of comments in imap_parse_url_path()
...
Tidy up of comments before next round of imap changes.
2013-02-25 15:53:24 +00:00
Steve Holme
e63c33d88d
imap: Fixed incorrect comparison for STARTTLS in imap_endofresp()
...
Corrected the comparison type in addition to commit 1dac29fa83
.
2013-02-25 09:43:23 +00:00
Steve Holme
94336d3c1e
DOCS: Corrected IMAP URL examples according to RFC5092
...
URL examples that included the UID weren't technically correct although
would pass the curl parser.
2013-02-25 09:36:52 +00:00
Nick Zitzmann
cc27aff7b3
darwinssl: fix undefined $ssllib warning in runtests.pl
...
I also added --with-darwinssl to the list of SSL options in configure.
2013-02-24 15:39:15 -07:00
Steve Holme
d23d2f2bd8
imap: Added check for new internal imap response code
2013-02-24 19:23:33 +00:00
Steve Holme
37f0caeabd
imap: Changed the order of the response types in imap_endofresp()
...
From a maintenance point of view the code reads better to view tagged
responses, then untagged followed by continuation responses.
Additionally, this matches the order of responses in POP3.
2013-02-24 16:14:16 +00:00
Jiri Hruska
671f896c0b
imap: Added stricter parsing of continuation responses
...
Enhanced the parsing to only allow continuation responses in some
states.
2013-02-24 14:38:54 +00:00
Steve Holme
7f5824a106
imap: Simplified memcmp() in tagged response parsing
2013-02-24 12:45:04 +00:00
Jiri Hruska
797b004738
imap: Reworked the logic of untagged command responses
2013-02-24 12:39:09 +00:00
Steve Holme
1ff6a8338d
imap: Corrected spacing of trailing brace
2013-02-24 12:05:15 +00:00
Jiri Hruska
66149248ba
imap: Added stricter parsing of tagged command responses
...
Enhanced the parsing of tagged responses which must start with "OK",
"NO" or "BAD"
2013-02-24 12:02:59 +00:00
Jiri Hruska
c38d69f06a
imap: Simplified command response test in imap_endofresp()
2013-02-24 12:02:57 +00:00
Jiri Hruska
324b7fe47b
imap: Corrected comment in imap_endofresp()
2013-02-24 12:02:55 +00:00
Steve Holme
e87a3ccc62
DOCS: Corrected layout of POP3 and IMAP URL examples
...
Corrected layout issues with the POP3 and IMAP URL examples introduced
in commit cb3ae6894f
.
2013-02-24 00:47:38 +00:00
Steve Holme
cb3ae6894f
DOCS: Updated CURLOPT_URL section following recent POP3 and IMAP changes
...
Updated the POP3 sub-section to refer to message ID rather than mailbox.
Added an IMAP sub-section with example URLs depicting the specification
of mailbox, uid and section.
2013-02-23 23:14:12 +00:00
Steve Holme
e0cbfe825d
pop3: Refactored the mailbox variable as it didn't reflect it's purpose
...
Updated the mailbox variable to correctly reflect it's purpose. The
name mailbox was a leftover from when IMAP and POP3 support was
initially added to curl.
2013-02-23 21:43:59 +00:00
Steve Holme
04456a74d0
FEATURES: Updated following recent IMAP changes
2013-02-23 21:15:06 +00:00
Jiri Hruska
5c5b7c7146
imap: Added the ability to FETCH a specific UID and SECTION
...
Updated the FETCH command to send the UID and SECTION parsed from the
URL. By default the BODY specifier doesn't include a section, BODY[] is
now sent whereas BODY[TEXT] was previously sent. In my opinion
retrieving just the message text is rarely useful when dealing with
emails, as the headers are required for example, so that functionality
is not retained. In can however be simulated by adding SECTION=TEXT to
the URL.
Also updated test801 and test1321 due to the BODY change.
2013-02-23 21:11:47 +00:00
Steve Holme
7f6c7331b2
email: Additional tidy up of comments following recent changes
2013-02-23 20:02:05 +00:00
Steve Holme
0b795db731
smtp: Removed some FTP heritage leftovers
...
Removed user and passwd from the SMTP struct as these cannot be set on
a per-request basis and are leftover from legacy FTP code.
Changed some comments still using FTP terminology.
2013-02-23 19:46:21 +00:00
Steve Holme
8a468ef222
smtp: Moved the per-request variables to the per-request data structure
...
Moved the rcpt variable from the per-connection struct smtp_conn to the
new per-request struct and fixed references accordingly.
2013-02-23 19:39:22 +00:00
Steve Holme
ed7d438a12
pop3: Introduced a custom SMTP structure for per-request data
...
Created a new SMTP structure and changed the type of the smtp proto
variable in connectdata from FTP* to SMTP*.
2013-02-23 19:31:59 +00:00
Steve Holme
8960d81b0d
imap: Minor correction of comments for max line length
2013-02-23 19:04:13 +00:00