request

PHP Zend Framework - How to Get Request URI Fragment from Request Object?

Hi, Say e.g. i have a URI http://127.0.0.1/somecontroller/someaction#12345 that takes me to the someAction() action of the someController controller. From there, i am able to retrieve the Request object via $this->getRequest(). i am also able to retrieve various information regarding the URI from the Request object. But, how can i ret...

IE fails to load CSS file

Hi, I have problem with site: http://ggmedia.pl/ - IE fails to load http://ggmedia.pl/style.css When I look on HTTP headers there isn't any request for this file. Changing filename and/or path doesn't help - any ideas? ...

Reading request parameters in Python

Hi All I am very new to python and having to get into this stuff for a simple program to integrate with an ASP.NET application that I am building. The pseudo code is as follows. Get two parameters from request. (A ASP.NET will be calling this url by POST and sending two parameters) Internally execute some business logic and build some...

String encoding problem on PdoStatement->bindParam()?

Hi, I'm trying to perform a simple SELECT statement from a string taken from a $_REQUEST var but it seem my PDO statement doesn't like the string format, why? My $_REQUEST var contains a string like Hello+World, so I need to replace + with whitespaces to do my SELECT statement correctly. // the data returned is Hello+World $phrase = st...

What's a clean way to adorn Django models with request-specific attributes?

I'm serializing User objects to JSON, and I'd like to indicate in the JSON response whether the serialized user is friends with the user making the request. I've added a to_dict() method to my User model that does the pre-processing necessary to serialize the object--that would be a nice place to add an attribute indicating friendship, ...

Intercept request for file download and send to Rails app?

Hi guys! I would like to make a Rails app to create a pretty download page for any file requested either through a link or by typing the url of the file. Is there a way to intercept the request for a file in Apache or elsewhere and send it to the app so it can generate the page? I'd also prefer not to change the url when redirecting to ...

How can I catch connection requests in my framework?

I'm building a framework (OSGi-like) where other parties can program a bundle for. But I want my framework to manage the QoS of the connection-requests that the other parties will do. The easy solution would be to ask them to use (or enforce them to use - although I don't know how) a specific ConnectionRequest bundle of the framework. T...

Getting raw post data in Google App Engine Python API

Hi, I am trying to get raw data sent as post to Google App engine, using self.request.get('content'), but in vain. It returns empty. I am sure the data is being sent from the client, coz I checked with another simple server code. Any idea what I am doing wrong? I am using the following code on the client side generating the POST call (...

Request-Aware Code in Google App Engine -- os.environ?

Hello, In GAE, you can say users.get_current_user() to get the currently logged-in user implicit to the current request. This works even if multiple requests are being processed simultaneously -- the users module is somehow aware of which request the get_current_user function is being called on behalf of. I took a look into the code of ...

Mail Sending Program & Request Timeout

I was asked to develop an auto-mail sending program on asp.net. It is supposed to send, say 5000 e-mails reading the addresses from a database. It will sure fall into request timeout tough. So it seems I have to convert it into a windows app. But I'd like to know if ajaxifying this web-app would help. If I write a web service, and my web...

Django: How to track down a spurious HTTP request ?

I have 3 AJAX functions to move data between a Django app on my website and some JavaScript using YUI in the browser. There is not a major difference between them in terms of their structure, concept, code, etc. 2 of them work fine, but in the 3rd one, I get one spurious HTTP request immediately after the intended request. Its POST data ...

How to get the source of request from Web Service?

I want to get <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:prin="http://localhost/example&quot;&gt; <soapenv:Header/> <soapenv:Body> THIS </soapenv:Body> </soapenv:Envelope> from webservice request I send from Java. I use javax.jws ...

Making super() work in Python's urllib2.Request

This afternoon I spent several hours trying to find a bug in my custom extension to urllib2.Request. The problem was, as I found out, the usage of super(ExtendedRequest, self), since urllib2.Request is (I'm on Python 2.5) still an old style class, where the use of super() is not possible. The most obvious way to create a new class with ...

Is it possible to add a parameter to the request header in xquery?

xdmp:get-request-field() allows fields to be retrieved from the request, but is there a way to add a field ala add-request-field() or the like? ...

Can headers be sent in an AJAX request?

Can I call the server to set a new cookie with an AJAX request (that is, after the page has already loaded)? For example, when a visitor hits a link, ajax would open a php file that sets a new cookie like this: setcookie('cookiename', 'true', time()+3000, "/",'...'); But this is done after the html (the page containing the actual <a>...

Apache HttpClient making multipart form post

I'm pretty green to HttpClient and I'm finding the lack of (and or blatantly incorrect) documentation extremely frustrating. I'm trying to implement the following post (listed below) with Apache Http Client, but have no idea how to actually do it. I'm going to bury myself in documentation for the next week, but perhaps more experienced...

Domain / Subdomain routing and using namespaced controllers

I am currently directing all traffic that is subdomained and/or cnamed to my site to a controller called external and a method called handler. This has gotten really messy and I would like to clean it up. I would like all external requests to be handled the normal rails way ":controller/:action/:id" however, I want these controllers in...

How can you make a php script only answer requests made from the same server?

How can I get my PHP script to only answer requests if the requesting script is on the same domain? ** Edit: The PHP file is being accessed by an ajax request and is proxy, so I don't want others directly requesting it to come up, is this possible? ...

How to extend request.user with own functions in django?

I've seen some nifty code on django-ratings documentation and like to create something similar. After googling around for now 2 weeks I got no idea on how to do this. Maybe you could help me what to search for or where to get some docs? Code from django-ratings docs: ... response = AddRatingView()(request, **params) if response.st...

Uploading file on Google App Engine using Datastore and 30 sec response time limitation.

Will the response timer on google app engine start upon submitting the web page's form? If I'm going to upload a file that is greater than 1MB, I could split the files to 1MB to fit in the limitation of the Google App Engine Datastore. Now, my concern is if the client's internet connection is slow, it would eat up the 30 seconds timer r...