rfc

What is an appropriate format for returning version-history of a resource via http

好久不见. 提交于 2019-12-25 01:12:19
问题 I am designing a ReSTful web service which provides a versioned resource. What is an appropriate return format (content-type) for returning a version history? 回答1: RFC5829 describes a version history but does not suggest a return format. First we assume you have a URL pointing to each version of the resource as in: /path/to/resource/ - returns latest /path/to/resource/v1 - returns version v1 /path/to/resource/v2 - returns version v2 So what you actually want is to return a collection of links

RFC3986 - which pchars need to be percent-encoded?

谁都会走 提交于 2019-12-23 07:20:08
问题 I need to generate a href to a URI. All easy with the exception when it comes to reserved characters which need percent-encoding, e.g. link to /some/path;element should appear as <a href="/some/path%3Belement"> (I know that path;element represents a single entity). Initially I was looking for a Java library that does this but I ended up writing something myself (look below for what failed with Java, as this question isn't Java-specific ). So, RFC 3986 does suggest when NOT to encode. This

RFC - 404 or 400 for relation of entity not found in PUT request

☆樱花仙子☆ 提交于 2019-12-22 13:59:54
问题 I'm building a REST interface for a database and I've run into a question. Imagine I have the 'Item' table which has two columns 'id' and 'user_id' which is a foreign key to the 'User' table. When doing a PUT request (to change an Item), the update will fail if the 'user_id' doesn't exist in the 'User' table. My question is, should this response be a 400 or a 404? Part of me thinks 400, as it's bad data supplied by the requester. But technically a 404 because the user resource can't be found.

Why responses to PUT requests MUST NOT provide an ETag?

巧了我就是萌 提交于 2019-12-22 08:24:12
问题 From Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content: An origin server MUST NOT send a validator header field (Section 7.2), such as an ETag or Last-Modified field, in a successful response to PUT unless the request's representation data was saved without any transformation applied to the body (i.e., the resource's new representation data is identical to the representation data received in the PUT request) and the validator field value reflects the new representation. This

System.Net.MailMessage allows some invalid email address formats

一笑奈何 提交于 2019-12-22 08:05:49
问题 As many people may already be aware, correctly validating email addresses can be somewhat of a nightmare. You can search all day long for a C# regex that matches the current RFC standards, and you'll find different regex expressions that give different results. If you look at http://en.wikipedia.org/wiki/Email_address#Local_part, you'll see that a period at the beginning or end of the local part is not allowed. Two consecutive periods are also not allowed. However, the following NUnit test

System.Net.MailMessage allows some invalid email address formats

大兔子大兔子 提交于 2019-12-22 08:05:14
问题 As many people may already be aware, correctly validating email addresses can be somewhat of a nightmare. You can search all day long for a C# regex that matches the current RFC standards, and you'll find different regex expressions that give different results. If you look at http://en.wikipedia.org/wiki/Email_address#Local_part, you'll see that a period at the beginning or end of the local part is not allowed. Two consecutive periods are also not allowed. However, the following NUnit test

How do you comment on an RFC?

梦想与她 提交于 2019-12-22 03:25:06
问题 I have some comments about the OAuth draft RFC (specifically about some errors it contains), but I'm not sure what the accepted way is to make them. There's an email address at the bottom, so do I simply send mail there with the comments, or is there some IETF tool I should know about for tracking comments/issues? 回答1: The OAuth mailing list would be my first guess. I found this through the IETF home page. 回答2: The best late-process way to report an error is indeed to use the email address at

What RFCs need to be considered in developing an SMTP client?

落爺英雄遲暮 提交于 2019-12-21 16:55:10
问题 In theory, the set of Request For Comments (RFC) contain everything that a developer needs to know to build an SMTP client. However, it is not always easy to know which RFCs need to be considered and which ones can be ignored. Does anyone have an RFC roadmap to steer developers through this? By RFC roadmap, I mean: A complete list of RFCs that need to be read and understood, in order to develop an SMTP client. An indication of which RFCs no longer need to be considered, because they have been

TCP Sequence Number

谁说我不能喝 提交于 2019-12-20 11:06:36
问题 I'm trying to understand how the sequence numbers of the TCP header are generated. In some places I read that it is the "index of the first byte in the packet" (link here), on some other sites it is a random 32bit generated number that is then incremented. I don't really know which is which, so here are some questions: How is the initial sequence number generated? (Please provide an RFC number if there is one) How is it incremented? How is the secret key generated? I read some of the RFCs

Online SpamAssassin evaluation / RFC conformant check [closed]

此生再无相见时 提交于 2019-12-18 10:55:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I want to check the SpamAssassin SPAM score of E-Mails including headers generated by a script from a WebApp. Therefore I need to run this mail through SpamAssassin to get the specific SPAM headers like: Yes, score=6.032 HTML_IMAGE_ONLY_24=1.282 HTML_MESSAGE=0.001 HTML_MIME_NO_HTML_TAG=0.635 MIME_HEADER_CTYPE