request

ASP.NET Global/Static storage?

I have a thread-safe object which is part of an API previously used in windows service/client scenarios. This thread-safe object is essentially a singleton and stored in a static variable so that all callers can access the same state. This API has recently started being used in an ASP.NET application, and I suspect that some funky behav...

check if sendsynchronousrequest was successful

hi all i just wanted to know if this is the right way to check if a sendsynchronousrequest was successful: NSData* returnData = [NSURLConnection sendSynchronousRequest:req returningResponse:nil error:nil]; if(returnData == nil) { //code showing an alertView for example } else { //do somthing else } thanks in advance for your ...

WSGI request and response wrappers for Python 3

Are there WSGI request and response wrappers for Python 3? WebOb looks nice (although there is some critique), but it seems to be written in Python <3. Werkzeug seems also to be written in Python <3. Should I write my own request and response wrappers for Python 3? Maybe this would be impossible, since WSGI seems to be somewhat broke...

Zend framework's getRequest()->getQuery() won't bring query string on localhost

I have the following code, which works fine on live site, but not on localhost. $status = $this->getRequest()->getQuery('status'); I have a URL like this: http://localhost:888//questions/ask?status=10 I printed the value of status, which is always nil. I am new to Zend framework and could not find a solution to this on net, looks s...

How to send html content through ajax request?

I have a form with a textarea (tinymce) for input content. When I perform an ajax request, I got the error: A potentially dangerous Request.Form value was detected from the client Then I've tried something like html.encodeURIComponent() or escape() but the error is still here HTML: <form id="editForm" action="" method="post"> ...

Redirect to an ASP.NET MVC page problem after POST request from Silverlight

In an ASP.NET MVC application I have a CartController with this AddToCart action: public RedirectToRouteResult AddToCart(Cart cart, decimal productId, string returnUrl) { Product product = productsRepository.Products .FirstOrDefault(p => p.prodID == productId); cart.AddItem(product); return R...

getRequestDispatcher and FQDN

Hi, is there a way to use request.getRequestDispatcher with a FQDN? Something like request.getRequestDispatcher("http://mysite.com/test") If I try it, I get the error JSPG0036E: Failed to find resource /http:/mysite.com/test I need to forward it outside the current context to another app. Thanks ...

C# UrlReferrer from PayPal return to vendor button? Object Not Set an instance of an object

After a successful Paypal transaction my customer lands on a Paypal Thank You page with a link back to my site. That link is going to the expected page. However If I attempt to pull Referrer information from my server code, I get error Object Not set to an Instance of an object. I have a page on the site with a link to that same page...

Django / Python, calling a specific class / function on every user Request

I was looking over the Django documentation on a way to do this but didn't see anything, though I may have missed it as I'm not sure exactly where to look... I want to be able to perform a specific action on every user request, such as instantiating a class and calling one of its functions, however the only way I know of to do this now i...

gtm-http-fetcher modify HTTP Headers

Hey Everyone, I didn't know if anyone here has had experience with the gtm-http-fetcher provided by google. I am specifically looking to modify the HTTP headers in a request. Any help or examples would be appreciated. -Pat ...

Change the url of asp.net page from code behind.

Hi All, I am trying to change change the url of current aspx page to the other url on a click of button. Using Request.Url.AbsoluteUri i can get the url but is it possible to modify?. If yes, what actions will it take i mean will it be a new request or a post back. Please let me know your views. Thanks, Mehul makwana ...

how does URL rewrite work in plain english

I have read a lot about URL rewriting but I still don't get it. I understand that a URL like http://www.example.com/Blog/Posts.php?Year=2006&amp;Month=12&amp;Day=19 can be replaced with a friendlier one like http://www.example.com/Blog/2006/12/19/ and the server code can remain unchanged because there is some filter which transfo...

How to stop execution of a Request in Kohana?

Let's say I have a controller template with a before function like so... public function before() { parent::before(); if ($this->request === Request::instance()) { // its a main request, throw an exception or redirect Request::instance()->redirect('/'); } else { // ok } }...

Ruby rails request question

/facebook/promo/#access_token=162592277090170%7C2.yCch3otjrdit_rgBFS6F0A__.3600.1285369200-727781553%7CtugQmoO0bRiadumHVQrrSiPRD9Y&expires_in=7174 This is the request facebook calls back. How can I parse the access_token ffrom the url? I could not find any way to get the access_token value. Please aware that it is not a reqular paramet...

Tornado Request Handler

For some reason i am unable to instantiate the set_cookie outside of the MainHandler.. This is a little code to show what im wanting to do.. Can Anyone help?? import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options from GenCookie import * class MainHandler(t...

Request Error (invalid_request) - Android Browser

I have a basic Jetty server running locally. If I pull up http://localhost/servlet1 in a web browser on my desktop, I am able to see proper content (basic html page). However, when I navigate to this site in the Android Emulator (2.2), I get the following error: Request Error (invalid_request) Your request could not be processed. ...

Accessing request.user in Django Forms.

This is pretty covered, but I'm still stucked here. I made a change password form, as you can see: class ChangePassForm(forms.Form): old_password = forms.CharField(min_length = 3, widget = forms.PasswordInput) new_password1 = forms.CharField(min_length = 3, widget = forms.PasswordInput) new_password2 = forms.CharField(min...

How to parse the "request body" using python CGI?

I just need to write a simple python CGI script to parse the contents of a POST request containing JSON. This is only test code so that I can test a client application until the actual server is ready (written by someone else). I can read the cgi.FieldStorage() and dump the keys() but the request body containing the JSON is nowhere to ...

MooTools AJAX Request on unload

Hi, i'm trying to lock a row in a db-table when a user is editing the entry. So there's a field in the table lockthat I set 1 on page load with php. Then I was trying to unlock the entry (set it 0) when the page is unloaded. This is my approach. It works fine in IE but not in Firefox, Chrome etc.... The window.onbeforeunload works in a...

Request to Asp page misses if called very fast

Hi, I have a website with is made in classic asp. On one page there are 5 textboxes and 5 labels. When users type some value in the textbox then using javascript (added on Onchange event) another asp page is called which done some calculations, fetches some database values based on the value typed and return the result to caller page to...