You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a client or a server receives repeated frame header entries, only the first header entry SHOULD be used as the value of header entry. Subsequent values are only used to maintain a history of state changes of the header and MAY be ignored.
For example, if the client receives:
If I were to implement this again, I would base it on the excellent code in the "net/textproto" package in the golang standard library. STOMP has a few differences (ie case-sensitive, white space sensitive) but the basics of the header handling would be similar to this package. See http://golang.org/src/pkg/net/textproto/
Having headers in a map makes them easier to work with for library users.
The order of headers is irrelevant, and, when the same header appears several times, the last one takes precedence.
As a consequence, you can populate the map on the go when you parse the headers, the parsing code remains very simple.
The text was updated successfully, but these errors were encountered: