Re: Bad Cookie / Internet Option / Internet Explorer

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 60570
interpreted = N
texte = Donovan Brooke wrote: > Well, I just checked the headers and I think I have a bug in you > mimeheaders.inc > > call = [include file=MIMEHeaders.inc&expires=5] > Results = Expires: Sun, 31 Dec -1 01:58:41 > > Do you have a recent copy of your inc file by chance? There are a couple of things that need to be checked: In GMTDate.inc, the correct offset must be used (this is the server offset from UTC, formerly GMT, so for a server in the UK this is probably 0). Also in GMTDate.inc, on a non-Win32 platform, you have to check to see what [date format=%Z] returns during Daylight Savings Time, so that the proper offset will happen. If I view the headers from the site right now, I see this: Date: Tue Dec 21 20:16:30 2004 GMT Last-Modified: Tue Dec 21 20:16:30 2004 GMT Expires: Tue Dec 21 20:16:30 2004 GMT which is just wrong (it is currently 21:54 GMT where I am). The system clock will have to be fixed to get the MIME headers to work right... John p.s. the current headers I am using are after my signature (beware linewraps) -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 [!] ------- GMTdate.inc ------- Takes optional parameter offset in minutes and returns current date/time in GMT long format Replace the {5:00:00} with your non-DST offset from GMT [/!][math time&show=f]GMT={[date %X]}+{5:00:00}[showif [date format=%Z]^Daylight]-{1:00:00}[/showif][/math][!] [/!][math time&show=f]NOW={[date %X]}[/math][!] [/!][if "[offset]"="[raw][offset][/raw]"][!] [/!][then][!] [/!][math show=f]offsettime=0[/math][/then][!] [/!][else][!] [/!][math show=f]offsettime=[offset]*60[/math][/else][!] [/!][/if][!] --- Create the GMTexpires variable [/!][math time&show=f]GMTexpires=[GMT]+[offsettime][/math][!] --- Create the MIMEexpires string [/!][text show=t]MIMEexpires=[!] [/!][if ([GMT]>[NOW]) and ([GMTexpires]>[GMT]) and ([GMTexpires]<86400)][!] ---- all in the same day ---- [/!][then][!] [/!][date format=%a, %d %b %Y][!] [/!][/then][!] ---- at least one day later ---- [/!][else][!] [/!][format days_to_date %a, %d %b %Y][math]{[date]}+{00/[!] [/!][showif [GMTexpires]>86400][math]floor([GMTexpires]/86400)[/math][/showif][!] [/!][showif [GMTexpires]<86401]01[/showif][!] [/!]/0000}[/math][/format][!] [/!][/else][!] [/!][/if][!] [/!] [Format Seconds_To_Time][GMTexpires][/Format][!] [/!] GMT[/text] [!] ------- MIMEHeaders.inc ------- [/!][if "[expires]"="[raw][expires][/raw]"][!] ---- Check for input variable [/!][then][!] [/!][math show=f]expires=0[/math][/then][!] [/!][/if][!] [/!][SETMIMEHEADER name=Date&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Last-modified&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Expires&value=[include file=^Includes/GMTdate.inc&offset=[expires]]] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  2. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  3. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  4. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  5. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  6. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  7. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  8. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  9. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  10. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  11. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  12. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  13. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  14. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  15. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  16. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( devaulw@onebox.com 2004)
  17. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( devaulw@onebox.com 2004)
  18. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  19. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  20. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  21. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  22. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  23. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  24. Re: Bad Cookie / Internet Option / Internet Explorer ( Rob Marquardt 2004)
  25. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  26. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  27. Re: [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  28. [OT] Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  29. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  30. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  31. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  32. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  33. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  34. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  35. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  36. Re: Bad Cookie / Internet Option / Internet Explorer ( Terry Wilson 2004)
  37. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  38. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan 2004)
  39. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan 2004)
  40. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  41. Re: Bad Cookie / Internet Option / Internet Explorer ( "Kaiwi, Marc" 2004)
  42. Re: Bad Cookie / Internet Option / Internet Explorer ( Jesse Proudman 2004)
  43. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  44. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  45. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  46. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  47. Re: Bad Cookie / Internet Option / Internet Explorer ( Donovan Brooke 2004)
  48. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  49. Re: Bad Cookie / Internet Option / Internet Explorer ( Jesse Proudman 2004)
  50. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan 2004)
  51. Re: Bad Cookie / Internet Option / Internet Explorer ( Jesse Proudman 2004)
  52. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan 2004)
  53. Re: Bad Cookie / Internet Option / Internet Explorer ( John Peacock 2004)
  54. Re: Bad Cookie / Internet Option / Internet Explorer ( "Kaiwi, Marc" 2004)
  55. Re: Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
  56. Bad Cookie / Internet Option / Internet Explorer ( Alan White 2004)
Donovan Brooke wrote: > Well, I just checked the headers and I think I have a bug in you > mimeheaders.inc > > call = [include file=MIMEHeaders.inc&expires=5] > Results = Expires: Sun, 31 Dec -1 01:58:41 > > Do you have a recent copy of your inc file by chance? There are a couple of things that need to be checked: In GMTDate.inc, the correct offset must be used (this is the server offset from UTC, formerly GMT, so for a server in the UK this is probably 0). Also in GMTDate.inc, on a non-Win32 platform, you have to check to see what [date format=%Z] returns during Daylight Savings Time, so that the proper offset will happen. If I view the headers from the site right now, I see this: Date: Tue Dec 21 20:16:30 2004 GMT Last-Modified: Tue Dec 21 20:16:30 2004 GMT Expires: Tue Dec 21 20:16:30 2004 GMT which is just wrong (it is currently 21:54 GMT where I am). The system clock will have to be fixed to get the MIME headers to work right... John p.s. the current headers I am using are after my signature (beware linewraps) -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 [!] ------- GMTdate.inc ------- Takes optional parameter offset in minutes and returns current date/time in GMT long format Replace the {5:00:00} with your non-DST offset from GMT [/!][math time&show=f]GMT={[date %X]}+{5:00:00}[showif [date format=%Z]^Daylight]-{1:00:00}[/showif][/math][!] [/!][math time&show=f]NOW={[date %X]}[/math][!] [/!][if "[offset]"="[raw][offset][/raw]"][!] [/!][then][!] [/!][math show=f]offsettime=0[/math][/then][!] [/!][else][!] [/!][math show=f]offsettime=[offset]*60[/math][/else][!] [/!][/if][!] --- Create the GMTexpires variable [/!][math time&show=f]GMTexpires=[GMT]+[offsettime][/math][!] --- Create the MIMEexpires string [/!][text show=t]MIMEexpires=[!] [/!][if ([GMT]>[NOW]) and ([GMTexpires]>[GMT]) and ([GMTexpires]<86400)][!] ---- all in the same day ---- [/!][then][!] [/!][date format=%a, %d %b %Y][!] [/!][/then][!] ---- at least one day later ---- [/!][else][!] [/!][format days_to_date %a, %d %b %Y][math]{[date]}+{00/[!] [/!][showif [GMTexpires]>86400][math]floor([GMTexpires]/86400)[/math][/showif][!] [/!][showif [GMTexpires]<86401]01[/showif][!] [/!]/0000}[/math][/format][!] [/!][/else][!] [/!][/if][!] [/!] [Format Seconds_To_Time][GMTexpires][/Format][!] [/!] GMT[/text] [!] ------- MIMEHeaders.inc ------- [/!][if "[expires]"="[raw][expires][/raw]"][!] ---- Check for input variable [/!][then][!] [/!][math show=f]expires=0[/math][/then][!] [/!][/if][!] [/!][SETMIMEHEADER name=Date&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Last-modified&value=[include file=^Includes/GMTdate.inc]] [SETMIMEHEADER name=Expires&value=[include file=^Includes/GMTdate.inc&offset=[expires]]] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Word wrapping (1997) Re2: AAgghh!! Help, please. SSL strikes again. (1997) [WebDNA] Cicada - WebDNA_CICADA_6.1.b02 - gratz and request...! (2009) Interfacing WebMerchant to www.fedex.com (1997) RE: Sum of Quantities (1997) WebDNA Server (2007) expired beta (1997) Browser Info.txt -- newest additions? (1997) Problems appending to database (1997) % (mod) was looping table rows (1999) Email tracking application? (2001) problem with [Format Days_To_Date] (2000) PCS search results page (1998) Multi-processor Mac info ... (1997) Serving images from databases (1998) [showif]/[hideif] question (1997) [math] are you there? (1999) # fields limited? (1997) Bug or syntax error on my part? (1997) One other big addition... (1997)