discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to set multiple headers with same name to GSMimeDocument


From: Sebastian Reitenbach
Subject: How to set multiple headers with same name to GSMimeDocument
Date: Wed, 03 Jul 2013 19:15:29 +0200
User-agent: SOGoMail 2.0.6a

Hi,

I'm use WebServer library. That uses GSMimeDocuments to send back a response to 
the client.

I want to set multiple cookies in the response so I do:

      for (id C in cookies)
        {
          [response setHeader:@"Set-Cookie"
                        value:[NSString stringWithFormat:@"%@=%@", [C 
objectAtIndex:0], [C objectAtIndex:1]]
                   parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"/", 
@"path", nil]];
           NSLog(@"the response: %@", response);
        }

However, I recognized, when setting a header with same name, it will override 
prior occurrences,
as the NSLog tells me. Reconsulting the documentation, it seems to work as 
designed.

Is there another way to set multiple headers with the same name, specifically 
to allow me to set 
multiple cookies in the response?

Sebastian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]