Discussion:
Headers.h in the CPPAPI
Walt Karas
2018-09-12 23:52:43 UTC
Permalink
Who has used this and what issues (if any) have you had with it?
zzz
2018-09-13 00:55:08 UTC
Permalink
Linkedin Traffic team is actively using it. It's quite handy.
(Thanks @bgeffon
One issue we found so far is Headers.wireStr() is much slower than the raw
API equivalent TSMimeHdrPrint, so you've better to avoid that.
Post by Walt Karas
Who has used this and what issues (if any) have you had with it?
Walt Karas
2018-09-13 15:21:13 UTC
Permalink
Do you use it to change the contents of headers or just to read them?

I've been told that if (for example) you get the TSMLoc for two
header fields, and then change or delete the second field, this may
cause the first TSMLoc to become a dangling pointer. It doesn't look
like the Header.h code handles this possibility.
Post by zzz
Linkedin Traffic team is actively using it. It's quite handy.
One issue we found so far is Headers.wireStr() is much slower than the raw
API equivalent TSMimeHdrPrint, so you've better to avoid that.
Post by Walt Karas
Who has used this and what issues (if any) have you had with it?
CrazyCow
2018-09-14 01:48:41 UTC
Permalink
read, delete, etc.
If you can share some pseudo code having the issue, we can analyze it to
see if it's a design issue or being used in a wrong way.
Post by Walt Karas
Do you use it to change the contents of headers or just to read them?
I've been told that if (for example) you get the TSMLoc for two
header fields, and then change or delete the second field, this may
cause the first TSMLoc to become a dangling pointer. It doesn't look
like the Header.h code handles this possibility.
Post by zzz
Linkedin Traffic team is actively using it. It's quite handy.
One issue we found so far is Headers.wireStr() is much slower than the
raw
Post by zzz
API equivalent TSMimeHdrPrint, so you've better to avoid that.
Post by Walt Karas
Who has used this and what issues (if any) have you had with it?
Alan Carroll
2018-09-17 19:35:17 UTC
Permalink
No, the TSMLoc should still be valid. That's the point of requiring using
TSMLoc. Internally it does a pointer indirection so the pointer can
updated. What's not safe is any pointer from a TSMLoc.
Post by CrazyCow
read, delete, etc.
If you can share some pseudo code having the issue, we can analyze it to
see if it's a design issue or being used in a wrong way.
Post by Walt Karas
Do you use it to change the contents of headers or just to read them?
I've been told that if (for example) you get the TSMLoc for two
header fields, and then change or delete the second field, this may
cause the first TSMLoc to become a dangling pointer. It doesn't look
like the Header.h code handles this possibility.
Post by zzz
Linkedin Traffic team is actively using it. It's quite handy.
One issue we found so far is Headers.wireStr() is much slower than the
raw
Post by zzz
API equivalent TSMimeHdrPrint, so you've better to avoid that.
Post by Walt Karas
Who has used this and what issues (if any) have you had with it?
--
*Beware the fisherman who's casting out his line in to a dried up riverbed.*
*Oh don't try to tell him 'cause he won't believe. Throw some bread to the
ducks instead.*
*It's easier that way. *- Genesis : Duke : VI 25-28
Walt Karas
2018-09-17 21:14:28 UTC
Permalink
I don't understand.

What does "pointer from a TSMLoc" mean? How can the TSMLoc still be
valid but not be safe?

On Mon, Sep 17, 2018 at 2:35 PM, Alan Carroll
Post by Alan Carroll
No, the TSMLoc should still be valid. That's the point of requiring using
TSMLoc. Internally it does a pointer indirection so the pointer can
updated. What's not safe is any pointer from a TSMLoc.
Post by CrazyCow
read, delete, etc.
If you can share some pseudo code having the issue, we can analyze it to
see if it's a design issue or being used in a wrong way.
Post by Walt Karas
Do you use it to change the contents of headers or just to read them?
I've been told that if (for example) you get the TSMLoc for two
header fields, and then change or delete the second field, this may
cause the first TSMLoc to become a dangling pointer. It doesn't look
like the Header.h code handles this possibility.
Post by zzz
Linkedin Traffic team is actively using it. It's quite handy.
One issue we found so far is Headers.wireStr() is much slower than the
raw
Post by zzz
API equivalent TSMimeHdrPrint, so you've better to avoid that.
Post by Walt Karas
Who has used this and what issues (if any) have you had with it?
--
*Beware the fisherman who's casting out his line in to a dried up riverbed.*
*Oh don't try to tell him 'cause he won't believe. Throw some bread to the
ducks instead.*
*It's easier that way. *- Genesis : Duke : VI 25-28
Loading...