IRC log of #zope for Tuesday, 2011-05-17

*** m8 has quit IRC00:03
*** supton has quit IRC00:03
*** Wu has joined #zope00:10
*** supton has joined #zope00:17
*** Wu has quit IRC00:17
*** Wu has joined #zope00:19
*** TresEquis has joined #zope00:21
*** MrTango has quit IRC00:33
*** TresEquis has quit IRC01:04
*** sp0cksbeard has quit IRC01:27
*** Wu has quit IRC01:38
*** alga has quit IRC01:44
*** mr_jolly has quit IRC01:46
*** John[a] has quit IRC02:44
*** srichter has quit IRC02:45
*** srichter has joined #zope02:46
*** mcdonc has quit IRC03:04
*** mcdonc has joined #zope03:13
*** tiwula has quit IRC03:23
*** webmaven has quit IRC03:30
*** John[a] has joined #zope03:42
*** Arfrever has quit IRC03:46
*** davisagli has quit IRC04:18
*** davisagli has joined #zope04:19
*** davisagli has quit IRC04:22
*** davisagli has joined #zope04:23
*** tiwula has joined #zope04:41
*** daMaestro has quit IRC05:00
*** John[a] has quit IRC05:05
*** davetoo has joined #zope05:52
*** dayne has joined #zope06:26
*** tiwula has quit IRC07:09
*** davetoo has quit IRC07:15
*** povbot has joined #zope07:22
*** davisagli has quit IRC07:25
*** srichter has quit IRC07:26
*** davisagli has joined #zope07:26
*** dayne has quit IRC07:53
*** hever has joined #zope08:02
*** menesis has joined #zope08:31
*** tisto has joined #zope08:35
*** sm has quit IRC08:43
*** hever has quit IRC08:51
*** hever has joined #zope08:57
*** zagy has joined #zope08:59
*** __mac__ has joined #zope08:59
*** zagy has quit IRC09:00
*** wosc has joined #zope09:00
*** slackrunner has quit IRC09:09
*** JT has quit IRC09:29
*** JT has joined #zope09:32
*** JT has quit IRC09:36
*** JT has joined #zope09:42
*** MrTango has joined #zope09:45
*** agroszer has joined #zope09:50
*** agroszer has quit IRC10:02
*** avoinea1 has joined #zope10:03
*** ccomb1 has quit IRC10:03
*** kleist has joined #zope10:04
*** avoinea1 has quit IRC10:05
*** planetzopebot has quit IRC10:08
*** avoinea1 has joined #zope10:08
*** planetzopebot has joined #zope10:09
*** avoinea1 has left #zope10:11
*** agroszer has joined #zope10:11
*** shastry has quit IRC10:11
*** shastry has joined #zope10:14
*** alga has joined #zope10:23
*** humanfromearth has joined #zope10:23
*** humanfromearth has left #zope10:23
*** alexpilz has joined #zope10:30
*** Wu has joined #zope10:41
*** hever has quit IRC10:44
*** alga has quit IRC10:45
*** hever has joined #zope10:55
*** goschtl has joined #zope10:58
*** kosh has quit IRC11:11
*** kosh has joined #zope11:17
*** kosh has quit IRC11:23
*** kosh has joined #zope11:24
*** menesis has quit IRC11:28
*** menesis has joined #zope11:29
*** Gogo|gui has joined #zope11:32
*** menesis has quit IRC11:35
*** John[a] has joined #zope11:38
*** John[a] has quit IRC11:43
*** alga has joined #zope11:45
*** sylvain has joined #zope11:47
*** Ariel_Calzada has joined #zope11:55
*** TomBlockley has joined #zope11:57
*** thevishy has joined #zope12:15
thevishyHow does Zope doeal with HTTRequest ?12:15
thevishyI presume its using HTTPRequest.py module ?12:15
*** mitchell`off is now known as mitchell`12:15
*** tisto is now known as tisto|lunch12:16
koshnot sure waht you are asking12:23
thevishyI mean whats the basic controller in Zope12:26
thevishyto handle user requests12:26
*** Gogo|gui has quit IRC12:26
thevishythe initiial page is a index.html12:26
thevishyCorrect ?12:27
koshindex_html for zope 2.x by default in the root of the zodb12:27
koshREQUEST/RESPONSE are part of ZPublisher12:27
thevishyYes ZPublisher12:27
koshI still don't get what you are actually really asking about though12:28
thevishyZPublisher/HTTRequest.py is there right ? What is its function12:28
koshit has the REQUEST and RESPONSE objects used in fulfilling a request12:28
koshwhat specficially are you actually trying to solve?12:28
koshalso what version of zope are you using?12:29
thevishyOkay so any HTTP request I send to a Zope server goes to REQUEST / RESPONSE right ?12:29
thevishyI am trying to implement a JSON handler for Zope 212:29
koshit ends up in them one way or another but JSON is normally sent over http so I don't see what makes JSON special for that12:30
koshwhen I did sending and receiving of JSON I just did that instead of html, nothing special12:30
koshREQUEST/RESPONSE don't change it12:30
thevishykosh : our idea is simple  , we have added a TinyMCE editor object into Zope12:31
thevishyNow the TinyMCE editor has a button that sends JSON requests12:31
thevishybut Zope2 doesnt know to handle the data and its getting trimmed12:32
thevishyso our idea is to get this data at the server side12:32
thevishyI am new into web development so figuring out lot of things12:32
koshzope should not be trimming any data12:32
koshall you have is GET and POST and considering the length of data you probably have from TinyMCE it should be doing a POST to a url on the server, so the data will be in a form var in REQUEST.form['somevarname'] and that data would be in JSON format12:33
thevishyin the TinyMce.py , we started a debugger and  we dont see the JSON data though we can see Cookies12:33
koshuse a network analyzer like wireshark12:33
thevishyok let me check that method12:34
koshsee how the data is actually sent from the browser to the server12:34
koshmake sure that it actually sends the right data to the right url in some sane manner12:34
koshonce you know that for certain then it is time to figure out what is going on in the zope end12:34
thevishyIt does and the proof of that is , in HTTPRequest.py , we can intercept the full data12:34
koshwhat doy ou mean by intercept it?12:34
*** teix has joined #zope12:34
koshwhat var is it stored under? why do you think it is being truncated?12:35
thevishyWait12:35
thevishyI will just check with a debugger and tell you12:36
koshso you see the whole thing in the debugger but then later you see only part of it?12:36
*** Wu has quit IRC12:37
*** eperez has joined #zope12:40
*** evilbungle has joined #zope12:53
*** Gogo|gui has joined #zope12:56
*** alexpilz has quit IRC12:59
thevishyActually I am not able to reproduce what my colleague did before13:00
thevishyI need to see the self object for the JSON request coming to the server13:00
koshself object for JSON request? that does not realy make sense13:01
thevishykosh : thats right , we see the whole thing in the HTTRequest.py Module and then at TinyMCE we see that JSON data is not arriving13:01
koshyou have POST and GET for how you work with the server13:01
thevishyI mean I need to see the request object13:01
thevishywhen I click on a JSON POST13:01
koshtinemce would have to POST the data to zope and it would arrive as a string13:01
thevishydoes that make sense ?13:01
koshso you will have a string on REQUEST.form['somevarname'] depending on what you sent it as13:02
thevishyYes it does a HTTP POST with content as application/json13:02
koshthere is no self for that, it is just a string13:02
thevishyright let me check REQUEST13:02
koshon the page you are posting this data to print out REQUEST13:02
koshthe data you are trying to use should be in REQUEST.form13:02
*** Gogo|gui has quit IRC13:03
thevishylet me check that one13:03
*** Gogo|gui has joined #zope13:04
*** digitalmortician has joined #zope13:04
*** Gogo|gui has quit IRC13:08
*** Gogo|gui has joined #zope13:10
thevishyZope receives HTTPReuquest objects and how does it decide where to give it ?13:11
thevishyWhen I make a request , it creates a HTTPRequest object and then forwards it to another object for doing the ncessary stuff13:12
thevishyright ?13:12
CIA-89tlotze 2 * r121682 zc.buildout/src/zc/buildout/bootstrap.txt: fixed whitespace in test expectation13:18
CIA-89tlotze 2 * r121683 zc.buildout/src/zc/buildout/tests.py: fixed a test for all Python versions supported by consistently relying on a newly introduced normalizer for pyc files in directory listings13:18
koshthe url you are working with13:18
koshso if you do a POST to /foo/bar/baz then baz is the code that will be run and the code has access to the REQUEST object13:19
koshbasically you don't worry about HTTPReques objects13:21
koshyou just grab what you need from REQUEST when your code runs13:21
*** Gogo|gui has left #zope13:36
*** alexpilz has joined #zope13:43
*** alexpilz has quit IRC13:43
*** alexpilz has joined #zope13:44
thevishyThanks I need to ponder13:45
koshwhat version of zope are you using? what kind of object are you posting to?13:49
thevishyZope 213:50
thevishyI am current posting the object to /tinymce/spell_checker13:50
koshwhat kind of object is spell_checker?13:51
thevishythere is a file called inymce.py13:53
thevishytinymce.py and spellchecker is an object there13:53
thevishydef spell_checker13:53
koshah13:53
thevishyso the problem is that the JSON object doesn't reach here13:53
koshso it is just a method then13:53
thevishyYeah13:53
thevishybasically we are adding a tiny_mce functionality locally13:54
koshwas this a product originally built to use zope?13:54
thevishyTiny_MCE , no it is a 3rd party product written in JS13:54
thevishyit does most of its stuff at client side13:55
thevishybut we need to implement the spell check locally13:55
koshwell in your spell_checker method look at the value of self.REQUEST.form.items()13:55
koshyour json data should be in there13:55
thevishythats what we did all the time let me check it up now again13:56
koshdid whoever that wrote your python code write it to work with zope?13:56
thevishyWe are trying to integrate with Python13:57
thevishyFew functions of TinyMCE needs to be done at server side13:57
thevishyits basically a js based thing13:57
thevishyThere was a ZTinyMCE egg but its old and depreciated13:58
*** menesis has joined #zope13:58
thevishy(Pdb) self.REQUEST.form.items()13:58
thevishy[]13:58
thevishyIN firebug I can see it posts the full data13:59
thevishyDo you get me ?13:59
koshwhat var does it POST it under though?13:59
thevishyJSON format13:59
thevishyid method params format14:00
thevishylike 100 params14:00
koshJSON is just a string14:01
thevishyOh...14:01
koshPOST should be key:value pairs where you would have somename and then the value would be the JSONDATA14:01
thevishySo how do I figure out the variable?14:01
thevishyWait14:01
koshI have no idea about that for firebug14:01
koshit is not something I Have played with14:02
thevishyCConteleght=94614:02
koshI have always used wireshark so that I know exactly what is being sent from the browser to the server14:02
thevishyContenlength=946.14:02
thevishyRight let me install that , would be a great tool14:02
thevishyis it available default in Linux OS'es ?14:02
thevishyany idea there14:03
koshsudo apt-get install wireshark   should normally do it for debian based os at least14:03
koshthe problem is that if you have never used it before it is not easy to use14:03
thevishyright14:03
thevishywill try it out now14:03
woscthevishy: open firebug. Do your post. Go to "net" tab in Firebug14:06
woscthere you should see "POST /tinymce/spell_checker" with a [+] beside14:07
woscclick that; you should see new tabs appear below; one of them is labeled "post"14:07
thevishyI see post tab14:07
woscthat lists all the parameters it POSTed to the server14:07
*** menesis has quit IRC14:08
wosckosh can take it from there ;)14:08
thevishyIn POST tab14:09
thevishyI see JSON14:09
thevishyand the format JSON uses like id , method and params14:09
koshwhat is in the JSON format does not matter14:09
koshit is just a string14:09
woscno, what we need to know is what the name of the HTTP variable is that *contains* all that JSON14:10
woscit should be written in bold to the left of that "post" tab14:10
koshI wonder if the idiots just sent the data directly to the server with no var names at all14:10
koshI saw someone do that once with files, no delimeters or anything14:10
koshI wanted to take them out back and feed them through a woodchipper14:10
thevishylol14:10
wosckosh: not idiots. those REST-ful approaches call for exactly that IIRC14:11
koshstill idiots14:11
koshbecause it makes it very hard to work with the data14:11
thevishyits like this14:11
thevishyhttp://ideone.com/M4TF214:11
woscthat's still just the JSON14:11
woscwe still don't know whether that is the *whole* POST body14:11
woscin my firebug there's a section called "Source"14:12
koshwosc: the whole POST body being json, csv or just some binary file is hard to work with and upload to in a lot of systems14:12
koshREQUEST.form is pretty much the standard for getting data from a form from java apps to .net to just about everything else, if you just shove something in with no name at all working with it is a bitch14:13
koshor generating it for that matter14:13
wosckosh: I'm not so sure about that14:13
woscI don't have all the request APIs memorized, but it should be possible to get the raw body14:13
thevishylet me check14:13
woscwithout any parsing14:13
koshwosc: that seems like a massively bad idea14:14
wosckosh: I happen to disagree ;)14:14
woscbut it doesn't really concern me all that much right now14:15
koshputting it under a name makes it trivial to work with in pretty much every tool developed14:15
koshwosc: why do you disagree that direct access to the raw data is a bad idea? that looks like it would be a massive security problem to me14:15
woscsorry, that doesn't seem like a very coherent argument to me14:16
koshraw data means it has not been parsed yet14:16
koshso you have to do all the careful checking instead of the app server14:16
woscwhat's there to parse, if everything there is is a JSON document (as in our example)14:16
koshwhat if it isn't though14:17
koshwhat if someone POSTs something else to that url14:17
koshyou can't assume that all data sent to a url will be data that originated from the correct source14:17
koshso if you start putting in stuff like CSRF protection then you are back to needing the data sent normally14:17
woscputting a "myparam=bad stuff" in front of it doesn't change anything in that situation, or does it?14:18
koshby doing POSTs using normal methods then all normal tools work so that you can easily do things like sanitize the data, block certain requests14:19
thevishywe will check a few things here and get back14:19
thevishythanks for your inputs14:20
koshusing some other format for the POST is just not a good idea14:20
koshthere is no reason that JSON data should not be POST as a key:value pair to the server14:20
koshthe jQuery stuff I have worked with has all done exactly that, none of them went some weird route of sending that data as the only payload14:21
thevishyI will check ont this point14:21
koshthevishy: I looked at the tinymce docks and they are pretty limited but I did not see how to setup spellchecking for it14:21
koshI did not even see spellchecking listed in the docs14:21
thevishyspell checking is a plugin feature14:22
thevishywhat we are planning to do is to use the plugin template and then do the processing at server end14:22
thevishywe plan to use a Python based spell checker locally and reply using JSON thats the main idea14:22
koshI don't see docs for that14:22
*** menesis has joined #zope14:24
thevishyhttp://stackoverflow.com/questions/1920162/tinymce-spellchecker-in-pylons14:25
thevishyseems to have a similar issue14:25
thevishyI will be back in few mins14:25
thevishydocumentation seems poor as per him too14:26
koshthevishy: try look at self.REQUEST.get('BODY') or self.REQUEST.get('BODYFILE')  and see if your data is in there14:26
koshif it is find the people that wrote that and take them out back and shoot them14:26
woscthevishy: the stackoverflow confirms it14:27
wosctinymce does not use a POST variable14:27
woscbut the whole POST body is the JSON14:27
* wosc doesn't know enough about the Zope2 request14:27
koshgod I hate apps that do that kind of crap14:28
koshthat question should not even exist14:28
koshis this was done the standard way then there would have been no issues at all14:28
wosckosh: I don't think you know enough about what the standard actually is here14:28
koshwosc: if you post it as a key:value pair then it would have come up correctly in any of the standard tools14:29
woscreminds me of "if all lemmings jump off a cliff"...14:29
koshwosc: the question on stackoverflow even says that he looks in his request object and did not find it14:29
koshwosc: there is a reason for standards, when you follow the standards systems work together better14:29
koshwosc: a huge ammount of time is wasted for NO gain by doing it this other way14:29
wosckosh: the standard we're talking about is HTTP14:30
woscbut I think that's all I'm gonna say about it14:30
koshcan you tell me any actual advantage of posting the data as the body of the request instead of a key:value pair like normally done?14:30
koshI know what the HTTP standard is, I know it allows this, that does not make it a normal approach by a long shot14:30
woscthevishy: as kosh said, try self.REQUEST.get('BODY') or self.REQUEST.get('BODYFILE')14:31
koshby going this other approach it makes it harder to test, harder for many common tools to work, harder for normal people to figure out what is going on14:31
koshthere is no realistic gain by posting raw json as the entire body and not going key value and a huge ammount of loss14:32
koshit is not going to transmit any faster, it won't run any faster14:32
*** Ariel_Calzada has quit IRC14:37
*** ccomb has joined #zope14:39
teixkosh wosc http://tinymce.moxiecode.com/wiki.php/Plugin:spellchecker they call it as  "rpc service document"14:40
teix[spellchecker_rpc_url] URL to back end for example the PHP rpc service document or some custom spellchecker service.14:40
*** Ariel_Calzada has joined #zope14:41
teixwhatever that means :P14:41
woscthevishy: did you look self.REQUEST.get('BODY') or self.REQUEST.get('BODYFILE') yet?14:41
*** srichter has joined #zope14:45
koshfor some reason the javascript web people decided that JSON should be done differently then other stuff the whole JSONRequest objects which exist now do POST and GET differently from how it has normally been done14:47
koshso a lot of normal tools also screw those things up14:47
koshsometimes I wish I could force the people that write that crap to maintain it long term14:47
koshand not just jump from project to project and never have to deal with the long term consequences of what they do14:48
*** eperez has quit IRC14:48
*** Ariel_Calzada has quit IRC15:04
*** tisto|lunch is now known as tisto15:08
*** yvl has quit IRC15:11
thevishykosh: JSON seems to be available at self.REQUEST['BODY']15:17
thevishywe tried many places but missed out this param called BODY , it has data in JSON format nearly !15:18
*** avoinea has quit IRC15:29
*** dayne has joined #zope15:37
*** ccomb has quit IRC15:59
*** digitalmortician has quit IRC16:02
*** digitalmortician has joined #zope16:03
*** TomBlockley_ has joined #zope16:04
*** TomBlockley has quit IRC16:05
*** TomBlockley_ is now known as TomBlockley16:05
*** dayne has quit IRC16:08
*** sp0cksbeard has joined #zope16:14
*** ccomb has joined #zope16:15
CIA-89lentinj * r121684 plone.z3cform/plone/z3cform/traversal.py: Don't assume widget has prefix we are expecting16:22
CIA-89hannosch * r121685 Products.ZCatalog/src/Products/PluginIndexes/common/UnIndex.py: Remove outdated comment and avoid creating Length() which is done again in the clear method16:22
CIA-89hannosch * r121686 Products.ZCatalog/ (3 files in 2 dirs):16:22
CIA-89Extend BooleanIndex by making the indexed value variable instead of hardcoding16:22
CIA-89it to `True`. The indexed value will determine the smaller set automatically and16:22
CIA-89choose its best value. An inline switch is done once the indexed value set grows16:22
CIA-89larger than 60% of the total length. 60% was chosen to avoid constant switching16:22
CIA-89for indexes that have an almost equal distribution of `True/False`.16:22
*** __mac__ has quit IRC16:42
*** thevishy has quit IRC16:42
*** wosc has quit IRC16:42
*** thevishy has joined #zope16:43
*** TomBlockley has quit IRC16:50
*** TomBlockley has joined #zope16:50
*** eperez has joined #zope17:08
*** TomBlockley_ has joined #zope17:08
*** TomBlockley has quit IRC17:10
*** TomBlockley has joined #zope17:15
*** alga has quit IRC17:15
*** pjfd4 has joined #zope17:17
*** pjfd2 has quit IRC17:20
*** cwarner_ has joined #zope17:43
*** thevishy has left #zope17:45
*** fredvd has joined #zope17:49
*** Arfrever has joined #zope17:53
*** J1m has joined #zope18:02
*** sm has joined #zope18:04
CIA-89satchit achapman-exc-info * r121687 zope.server/src/zope/server/http/ (wsgihttpserver.py tests/test_wsgiserver.py):18:06
CIA-89further compliance with WSGI PEP.18:06
CIA-89and tests.18:06
CIA-89satchit achapman-exc-info * r121688 zope.server/src/zope/server/http/tests/test_wsgiserver.py: fix typo.18:06
CIA-89tseaver * r121689 zope.interface/CHANGES.txt: Garden changelog.18:06
CIA-89tseaver * r121690 zope.interface/ (CHANGES.txt setup.py README.txt):18:06
CIA-89Detailed documentation moved out-of-line from PyPI page18:06
CIA-89- Now links to http://docs.zope.org/zope.interface18:06
CIA-89- Garden ReST of README.txt, CHANGES.txt18:06
CIA-89tseaver * r121691 zope.interface/README.txt: ReST fix.18:06
CIA-89tseaver * r121692 zope.interface/CHANGES.txt: Better phrasing.18:06
CIA-89tseaver * r121693 /zope.interface/tags/3.6.2: Tag 3.6.2 release.18:06
CIA-89tseaver * r121694 /zope.interface/tags/3.6.2: Missed version bump18:06
CIA-89tseaver * r121695 zope.interface/setup.py: Prep 3.6.2 release.18:06
*** sm has quit IRC18:17
*** alvaro_o has joined #zope18:19
*** alvaro_o has quit IRC18:20
*** fredvd has quit IRC18:24
*** __mac__ has joined #zope18:34
*** agroszer has quit IRC18:42
*** tisto has quit IRC19:05
*** pjfd4 has quit IRC19:12
*** alexpilz has quit IRC19:28
*** Spanktar has joined #zope19:31
*** sylvain has quit IRC19:54
*** davisagli has quit IRC19:54
*** davisagli has joined #zope19:54
*** alexpilz has joined #zope20:22
*** TomBlockley has quit IRC20:27
*** srichter has quit IRC20:30
*** evilbungle has quit IRC20:34
*** giampaolo has joined #zope20:38
*** zagy has joined #zope20:42
*** sm has joined #zope20:48
*** TresEquis has joined #zope20:54
*** kleist has quit IRC20:56
*** ccomb1 has joined #zope21:06
*** TresEquis has quit IRC21:06
*** ccomb has quit IRC21:07
*** TresEquis has joined #zope21:10
*** hever has quit IRC21:12
*** digitalmortici-1 has joined #zope21:21
*** digitalmortician has quit IRC21:21
*** menesis has quit IRC21:31
*** tiwula has joined #zope21:31
*** teix has quit IRC21:35
*** allisterb has quit IRC21:50
*** __mac__ has quit IRC21:52
*** __mac__ has joined #zope21:53
*** teix has joined #zope21:55
*** srichter has joined #zope22:08
*** TomBlockley has joined #zope22:13
*** m8 has joined #zope22:14
*** teix has left #zope22:14
*** TomBlockley has quit IRC22:15
*** giampaolo has quit IRC22:17
*** TomBlockley has joined #zope22:21
*** cwarner_ has quit IRC22:23
*** benji has quit IRC22:33
*** ccomb has joined #zope22:35
*** ccomb1 has quit IRC22:37
*** RichardBarrell has joined #zope22:43
*** John[a] has joined #zope23:03
*** tiwula has quit IRC23:10
*** __mac__ has quit IRC23:14
CIA-89ldr * r121698 plone.z3cform/docs/HISTORY.txt: Prepare plone.z3cform 0.7.6.23:17
CIA-89ldr * r121699 /plone.z3cform/tags/0.7.6: Tagged plone.z3cform 0.7.6.23:17
CIA-89ldr * r121700 plone.z3cform/ (docs/HISTORY.txt setup.py): bump version23:17
CIA-89satchit achapman-exc-info * r121701 zope.server/src/zope/server/http/wsgihttpserver.py: whitespace fix.23:17
CIA-89satchit achapman-exc-info * r121702 zope.server/src/zope/server/http/wsgihttpserver.py: comment to explain what happens next.23:17
*** alga has joined #zope23:19
*** ccomb has quit IRC23:22
*** zagy has quit IRC23:23
*** m8 has quit IRC23:50
*** TomBlockley has joined #zope23:55
*** evilbungle has joined #zope23:59

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!