Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Cookies and Redirected URLs

From: rebol-list2:seznam:cz at: 22-Sep-2003 10:51

Hello Reboler, Sunday, September 21, 2003, 8:17:20 PM, you wrote: R> Hi Folks!, R> Sorry to bother you, but I'm really needing of your guru advices. R> How can I read all the cookies set by the server? R> I'm reading an URL that sets a cookie, then redirects to another URL, set R> another cookie, then redirects to another URL and set another cookie, this R> process takes five steps. R> I just can read the first URL, because after I set the cookie it redirects R> to another url, then I receive the error 404. R> I've also tried: R> port: open http://www.somesite.com/?xas&fsnf«NDF;;; R> headers: port/locals/headers R> urls: port/locals/list R> if empty? urls [ urls: port/url ] R> close port R> If I could get all the new urls and the cookies great, but it's not working. R> Any tips? R> What about RebOldes' cookie-daemon? R> Thanks in advance, R> Best Regards, R> --DJ The cookies-daemons was not able to staore cookies during redirection, but it was not difficult to fix it. Just try the latest version bellow. The %http-patch.r also contains Rebol's http bug fix related to setting proper referer value (it was not possible to set custom referer value if you were using "POST" command). 1. run %cookies-daemon.r 2. read the page - all related cookies should be sent with the request and new one stored in the cookies-daemon/cookies block. If you set "trace/net on" you can see something like that: URL Parse: none none 127.0.0.1 85 test/ redirect.php Net-log: ["Opening" "tcp" "for" "HTTP"] connecting to: 127.0.0.1 Net-log: {GET /test/redirect.php HTTP/1.0 Accept: */* Connection: close User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Host: 127.0.0.1:85 } Net-log: "HTTP/1.1 302 Found" Net-log: ["Cookie" "new" {redirected=yes; expires=Mon, 22-Sep-2003 08:37:38 GMT; path=/; domain=127.0.0.1}] URL Parse: none none 127.0.0.1 85 test/ cookie.php Net-log: ["Opening" "tcp" "for" "http"] connecting to: 127.0.0.1 Net-log: {GET /test/cookie.php HTTP/1.0 Accept: */* Connection: close User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Host: 127.0.0.1:85 Cookie: redirected=yes } Net-log: "HTTP/1.1 200 OK" Net-log: ["Cookie" "new" {name1=hura; expires=Mon, 22-Sep-2003 08:37:38 GMT; path=/; domain=127.0.0.1}] Net-log: ["Cookie" "new" {name2=hura2; expires=Mon, 22-Sep-2003 08:36:08 GMT; path=/test/}] Net-log: ["Cookie" "new" {name2=test; expires=Mon, 22-Sep-2003 08:36:08 GMT; path=/test}] Net-log: ["Cookie" "new" {TestCookie2=hodnota; expires=Mon, 22-Sep-2003 08:36:08 GMT}] Net-log: ["low level read of " 2048 "bytes"] Net-log: ["low level read of " 2048 "bytes"] and here is the cookies-daemon: change-dir dirize to-file ask "Choose directory to extract: " write/binary %cookies-daemon_0.3.1.rip #{ 5B0A202020205245424F4C205B0A20202020202020205469746C653A20225245 424F4C2053656C662D65787472616374696E672042696E617279204172636869 766520285249502922200A2020202020202020446174653A2032322D5365702D 323030332F31303A33323A33352B323A3030200A202020202020202046696C65 3A2025636F6F6B6965732D6461656D6F6E5F302E332E312E726970200A202020 20202020204E6F74653A207B546F20657874726163742C207479706520524542 4F4C20636F6F6B6965732D6461656D6F6E5F302E332E312E726970206F722072 756E205245424F4C20616E6420747970653A20646F20636F6F6B6965732D6461 656D6F6E5F302E332E312E7269707D5D200A2020202066696C653A2025636F6F 6B6965732D6461656D6F6E5F302E332E312E726970200A2020202073697A653A 2034343036200A20202020706174683A2025636F6F6B6965732D6461656D6F6E 2F302E332E312F200A20202020766572626F73653A206E6F7420616C6C205B73 797374656D2F7363726970742F617267732073797374656D2F7363726970742F 61726773203D202771756965745D200A2020202066696C65733A205B25687474 702D70617463682E7220323735322025636F6F6B6965732D6461656D6F6E2E72 20313635345D200A20202020636865636B3A2035363936303239200A20202020 6966206E6F74206578697374733F2070617468205B6D616B652D6469722F6465 657020706174685D200A20202020617263686976653A20726561642F62696E61 72792066696C65200A20202020617263686976653A206E6578742066696E642F 636173652F7461696C206172636869766520746F2D62696E617279206A6F696E 202221444154412220223A22200A20202020696620636865636B203C3E206368 65636B73756D2061726368697665205B7072696E74205B22436865636B73756D 206661696C65642220636865636B20636865636B73756D20617263686976655D 2068616C745D200A20202020666F7265616368205B66696C65206C656E5D2066 696C6573205B0A2020202020202020696620766572626F7365205B7072696E74 205B7461622066696C655D5D200A2020202020202020656974686572206C656E 203D2027444952205B0A2020202020202020202020206966206E6F7420657869 7374733F20706174682F3A66696C65205B6D616B652D6469722F646565702070 6174682F3A66696C655D5D205B0A202020202020202020202020646174613A20 6465636F6D707265737320636F70792F706172742061726368697665206C656E 200A202020202020202020202020617263686976653A20736B69702061726368 697665206C656E200A20202020202020202020202065697468657220616E7920 5B0A202020202020202020202020202020206E6F74206578697374733F207061 74682F3A66696C65200A20202020202020202020202020202020636F6E666972 6D207265666F726D205B66696C652022616C726561647920657869737473202D 206F76657277726974653F20225D5D205B0A2020202020202020202020202020 202077726974652F62696E61727920706174682F3A66696C6520646174615D20 5B7072696E742022736B6970706564225D5D5D200A202020206E6F6E655D0A21 444154413A0A789CBD1ADB6EE336F6D903CC3F70340F498A9595CCAD0B65A7C1 34CDB605E68624451F042F204B8CAD469654921AC753F4DFF71C92BA5026153B 995DA1E838E2E1E1B9DF2846E7654EA2A74F262213390D89F7CBF5F567B28C8B 34A78C54B148961EAC5635AB4A8EEBFFCEEE684A0ECA8A16E4A62E1291950511 25A918BC62F986702A88585272003FFCA42C6F33CAC992C629E0FB12B32C9EE7 145126E56A450B1192BFAE971927F0DFAA4CB39B6C1BFB0D2B57E412290DCE4B 46C98BE9EBE99BE9CBE9C9B3BF9F3E993D7DF2F409DF704157014F96744579B0 14A20A6A4E991F2FE411DE87F26B96E771F06A7A4C0EE164602C033A4EC987AB 5F2FC89BE9F129F93D2BD272CDC9C76BF27A7A7CE4D9B16AC9846415DF523202 21853A414642C909FE4D7A4F5532413C1494FC051244588F9850415E26714E10 B15FC5C92DC856FE46E1C13984515E9505A77E2C45C509AF9384724E286325EB 96F3ACA003D422660B442735C315DA2FF00B250EBA167E1A8B1831D4B9202046 CAB2C4072DDF6DCEE09439FE146502D663A29DD7599EFA92274E8BD4072A7D10 4F724B124663417D46FFAC2917338B3C14B75C0BB79CFF4113F18C4479C64187 49596D48346B080E495116743638DDA43324710ED62D51CB3781D85494BC2507 1A0E700889E78CF48096C0FD1071C756A3CED950A3F8F40513129A817E9942AD 6C04CF464973121D709E038E039154C3C3F0416B50A8823ED2A0A15C49D8AD87 56A635034A18FDA3CC0A1065B9A62C89390583F3B96059B130C8F3C220F0D41B 9482C101FECFCF52F2AF1FC83F8F4924113EF742CF58058EA4A23C6F46781EF3 A58DB7EC86DC94759136528FC5924471051CA72DCDDDD20E18B42DDB71A84507 164382A01C508A4DAF1A7AE0060E407C308CFA3F4304FC459AEBD0A4DD1BE5E6 120D5E0AB853455C80F9F7EC596BE3705B3747C4A59BE733F7C13601350FC6D2 90A0881B92A404C8012E8CECAB62CEADFB7061641F2A461AE71909E511F709CC 2AEDC1DBFB90E0F319C9F3DFD56259B2EC6B8C31552BC2FB31E6E0761EA1C51C FD47BE54B42941034723D2C5E781C2EF057F74E49B92AD48E49D7FFAF8F1E2FC DA1B7219A0F1A8341E9C4C4FFE137863B8B5C3F4F34B01A86A91E53CA07732C8 0CC5B817360F0818D9D11D86BFF272616C1E3110486A409A0A5DE8C248E86E5B 93B2105951531F935C20EAA2A0B91DDA25389DF5D7254B7980550E142E50E398 C4449C2635838A49B09A5A343F78353CAB9FE5A17EF9F9E27A2846339D365949 170C3A204AFB94BE565BD3D583A2D43BA8302A2CAABE0BBE73E9F6BC04B126CA 7DBC2487D2D105F91B9669EF5499A60385FEC72CAE8C3475D015770EB4FFD710 EAC82DF2A43928E456A7292E406341527301056D5B63855028E5202C0BCC81AE 9B5B247A8B55996E850E3DB8C5B31B2B72FB3E16F213B010922BCABEE08EF731 9CF641D7F6A1361FFF322E16149203588A0035FA17450220C5A27B730DB55AE8 B62F09F39E160BB18433C0EA95B55DDC551943C497F486323CBF6F8B83C88EA5 DF6E32E897C7611B5E8FEDD1AD3331E580AA92012FDC314FED9C7FBA33A29EA9 62269AD998D8378DEF9BBE1B9B1F760BFD54FE48D31DC9E1FF93DCBDBBB7F7BC 173A497A477E20C72E72EDD674E2CE958F168E74B7AE0FF0E61B41F95B6F9B6A CFF71E270A957AC0B7E89D80963E4FB1D5B8C9722DF643A511E054F716DB9D40 AFF28FA08F38B2413615BF51E123B4B50D6A232D3AFC2383F54DD6741866A846 900E2E786135F4C976C113799F3F5D5D1389DC530233B08C5850571F208AC7D9 8EAEDD464CE8B48DA88D3EB27EAFF5DC3BF34884098B24398DF5B26C060D9859 131A593E56999A59C003F2F24CC5F8E0CE5FAFD73ED6C13E20A19838683A5665 0EB3452EFF3DEBCBD955016A5687093878895CB47F004FD1CCE136A757E58A8A 0C4B985FC129684A4A8992296912B18C0B393043D394A3AE463C0E7CD3292F01 15A3ABF20B60830254601B9F417D338737E4704E9318A21BE87933A7889A5130 6F2817D30D8ED97040D71C2ECFD316AC6A8D23E7A9386F524722B5287422511F 9645BE41176A90E21960E239A98BDBA25C17FFE836C01224059C50D1D4711220 521319693F3719E3DB2DC881364587B94E268F899793C9847C7B53DF3A0A8EB1 588CED1D3EBD00346AB596ED8E6266D8511A7345CDF670DED1396ED4C4DC7E2A B3F9F3033A4C1C9C4E26968D7A9A0CCC83ED17C1A23760463C6ADF29100B66DF DBA7DE1B2F0C910DA836C796CE711F1E9441FF1179CFF13177E940DE27DEA299 7DBBDF0774BDB2306986B9D19A65D03266E5004507B115196D2A353AE871591A A06D8FAA9A6E6B823426D6A1D96A5759723BA0FCC4429EA9978602C992568B39 16DF49316393747CB4C3A8C865024769A9C6F1CED277B8B9CE45DB14EA352532 703BF96F33EE078CC31B00574E6DE1300E8758938190E80250730A3282E81633 C81926E9B25C1A2909EEE54C032D64CA41BEF69F84981C87B6935E1C1F3760FA FE631CE5506656A42780D4305F8B60F1E0E6C6C5B67A32BAFA6A74F5CDC8EA4B 3817A2F63A66A975F56474F5C5E8EA1855AF8EBF273217C4D065EDA4368DCB2A E1F512BB82E850B9BACDBB8F701A83457DD4F821C2DE6330D2907DCCCEF69B37 0D83B3A3A81964A0A13FB3B98E8A9B71B1D1B72556A06005969D55F9609630BC E2C207C9F2D585962C496461F90C8CCDD649D15595CB518A6C4E9A4334F1D64E 47A63EFB6447D65542492740848A353D614A5489EC746494BFBA53F4F40E4496 948C81FCA0FC9368536FB7165172DE5C2D694D344C352A9975A21A487590AD47 0CACBD2A5497B54A81E4F5B14DD8FB1863539AE8AB53D9D1CA78E9E9717BBF0E 5140B6AEB4BDF00C5A42DB1F9FA511EB917EABF9DE24AE3DDD8199675F810F1B A760087FD6946DB06988E00F8D2830BB245DEC29347919A70E38EBA009B04A63 3923826D34A6545A72E79C946181D10A2830C68433635373D38B62D566BC85DE 94647005F67A2E6BC359A4364EC6C1C26175C9ADD5A5257FB5B3801AF4768093 8EF1F82449B7DAAB51EDC8A9F9C006ED954A73D7AF6F862EF0CF2921D7FA0E80 E5CD6410FB122F296B28815086734CF7E014147A3A8057F3DA3639C226A318B8 27EAEA9462E5AB8A17545FE07BB63EBDF13DF0D01D5D0F310279699DC03ED806 72584B22ADB35B9B5319BE84E89C11B36F6A23E6F52D4DAA5FE86B8BC540D869 D15980EA1959EB547A2E7E4FE5292F46B0890D56F8C5CFF6760FBB0CF96DC0BD 501CC1460BC276BE17F66779A171D1E21CD5354F57A2FF76F9DE979A65818A2E 2020296A7D59A4BFAFF1DB0F02E417115BC4BB8F6A32A7419E149971712493F4 F8BDD5EE175CCD7DD3A8201B390C0280FC844BFB2306791D70AE246ACF38C703 300202EC0708E495D715BEA029D229F0FBACCB8B1F3FBD9FBA66C3F8B8C6C663 1C68FB3B54639EA14E8EC85BF511496F26AC0D434DBFB676C061C6272B729EDC F726F9C60BDAD18C42A94213BC1D9B481AB6BA87F97CE3AF706C237203C2391A 772AC8398893CE2E097587A268EF14F49733059D672CA9731CA875D69B5201F5 204DFF762AE70169139FDE976A7600F386DD75B831F7B1D5BF0EF36F7BE77BBA 99A6DDFA56154313F22D177587D2F5F56D9DE39AF0C8C9500719A88B46DBD791 FDF5C10687807B50EA3ED28D56AD0F36B8AD7B98DC9BC98B3D3CABEFF646A399 42F0001EB7365B39D9E35AEEDE2E6EE8AA7B796AA8EE5A099A257402FA5E063C B5C8D04F776B0247DDEF5ED71B733BF7B79BA39FD08C8E81BB35606FF65F1B42 6A0F372D0000789CAD58EB6FDB3610FFEC02FD1F2E2C8675286CD971B21572D3 607DAC2BD0264396761F040D906DDA562D8B1A49254D1FFFFB8E2F8994EDA4D8 DA068E75C7FBDDF1DECAC5CB67E76F20B97F0FF0DF652E0B1A0379CED83AA7A2 3FCFE88695C4305F64127947FDC7FDC3E1706C6867D90669252BA9797E4FB9C8 5919C370301E0C0DEDB7BC08CEFCCE42995F6BB9621CB59E17732AACB2F3EB92 72FFD445BE5C49E153CE289D0784CB6C1A3CBF13D932D0F447CD2B2602D273B6 D9D052C6F0F9AFBC289021E19AF1355CE77205022D0556CCE1824E590157E672 E2E0ABBD482E24E3373EDC9BAC5CD61DAD973755476529B54AEF72F49F3AE778 2AF9612565D5AF32395B0D787AFF1EFEDCBF27A8841F67414C6093ADD1B6E907 3A93072A7CBD398340184956243687A7059BAD0F60341CC224A11F2B542860CE 36595E02CAACA0C460C25556D41450D8FC943AC09A1883158AC100F72DD960C4 1AC4DDCAEA466372DEE7B5CA8064C6AA1BA34432202704C43AAF2CD9A845FA03 32B18C2F107268394FD316799EC92CBCD9B131B9CAB8A07D732A86455DCE122B 22248708CF6605C84D952AAFF56605CD3878988AD85CB464D7EA59438287A245 B7EE080F03DB389DD7330A89BE72E832FD2BFD49A364E58DC5DB0168E83D81F9 385B4573BAC8EA421A275A995E8F5873494BEAE1FD544094D9C68184343CFF76 D1270C173C42FF2AA329DAFC81613E24281F1D028988F25434068AF540399474 99C9FC8A9EB6B209E99334218F48DAD052A7AAF942546EF8F6995CB1A8DAC268 0427187DD49870CCF02B6B789A688374821AC236B8494014CC17BA82550A9EDA 7B272E3B8DB0134A1B532615CF4B69A3B451D51EAA99645585A9E7A78839E190 CC6F13CBDE172082CE6A4E094C1EEE9094BCA6E6A896D31FCE02DB766362CCF0 C588C99B9063038BE144860DAA01D47E503EF030309C495E0ACA25C82C2F0278 E5DD5B24C7FB258D778D6CA78810EA01191078F214163917D2F51A87651FD519 2D6FC93EBAABA01DDDEA1B3DA78F858629D292CA7ED31D758BA818EA6E9B03B0 5A9A1CD195E4B7999F15D565954E4E754B251FAD9890A65FA8ECD685ADE93A7B 09096D7E45DD65052C18D708B107A44F5FAF707A627232E37B171791DA5AB215 64A958434F4E5419860D45A85EA44A0A0DE1ADD2639387F6A845CA700ABADA68 6B699197732D1C71AAC620359960E3E1B41F4241CBA55C9DB6148BE4F538D4B4 A9E44D7B66ECE83BD499BA9FE73CFF445B011861C7EAAA1A87F5D814F8C44F5D 1559D7E23EDBA481AF0DC6911E4BEEE918C8DF11718D601BC6E4666B9503DE8B 3621E996752E1B9E652E6F63E239D4CB67A5C283D6396613BE290883C8A614BE 5FECF6039AE8B4D6ED0949DAC9453DDD3B49D834C3E6D48A361E114D1D0A551C 4ABEBD0B86425B3AC16FEA3716AEAD571CD479B93C80F170A8185863349BADB0 245BAB532D9F04C14500CB3516D9C2B059ABB80996B209E08E5CD276DB0936CD 66EB16B4C9A6D47621716717C22081EA05EE180EE06BFFFBA9B1C38648A9A666 7310917AE817B969485B4DEC48513DB01DDCC65FED5E98EE51616B1B3B3EF913 EF649C41709EE35A61A210AC2CCDC2E8F74CD7359B866988DA72BD08FA7B9D3F 8111CDAD3A766B19D85DA729AE1726D72515D861EFAC8CED9E6E815D7EEBA7F4 BFB7CD6F53D0A03924BB8A9141E476B9A0ADFA260462381ECFDF12202F5FBCC3 CFB39797F8797EF10A3F5F9DBFC7CFB7AFDFE0E7EBB34B5CE18ACC0CEA06670C 4F1AB33C7AB31E1DEEE43BF6D110DF369E06F71AEF671DED671D77FAA629D888 95C58DF1A95F18B613282F6036D6322F44A4BE156CD9EC0A78631421C1B2D7A0 DF2AC6E9A21674DE11DDB7D39D3D774DDAB3D01CE154D6BC545F774E7AFF46D6 B29614FBEC68A4B97BB6A1F660EABDB5ECE8B00AFE34D62BAA7EDCBB7B841BC3 F6EE71FBD6D19D7D64C95483902B5E2B5BDD4197E3F6D78E3AF3DC81B573B235 B87CFED8E38F77F08F3CBE4BC3F61DA179FB69CE7717ADDE37ED5AFEAD078381 39386FDECCD22DB06814075AB7F8C701DFD372DBB4ED985157EAD5CF33C3F30F E6C3222B847BD9E94D7126ACB7FC73BBB2ED1251934247526908DDFA5479D521 DBB1EC27AA771ABC3BA85AF6F083C956D28FD22F97BB770D3B4F83F96469E19F 61A26D21DB7C6C75DB47A54E0DCACEB837F7BCA3CEFE6799191F7577D3116027 F3963FF5DEDD2E723EAFB3C57E9765CEFD610B9D84F49A177842CA2A8EA2D1E1 2F8321FE1FC58F8F2335AFAD8707D5AA5212FF02115E01B8AF140000 } do %cookies-daemon_0.3.1.rip -- Best regards, rebOldes -----------------[ http://oldes.multimedia.cz/ ]