http-error

“http error” when using Uploadify plugin for JQuery

拜拜、爱过 提交于 2019-12-01 21:03:05
I'm using the plugin from here: http://www.uploadify.com/ I have setup a simple test case, select a file etc & I get a "HTTP Error" when I try to upload. Here is the relevant code from my header.. <script type="text/javascript" src="../js/jquery.js"></script> <script type="text/javascript" src="../js/swfobject.js"></script> <script type="text/javascript" src="js/jquery.uploadify.v2.1.0.min.js"></script> <link href="css/reset.css" rel="stylesheet" type="text/css" /> <link href="css/admin.css" rel="stylesheet" type="text/css"> <script type="text/javascript"> $(document).ready(function() { $('

Redirection + 403 error

一世执手 提交于 2019-12-01 19:48:11
I am searching for a way to have something like that : return HttpResponseForbiddenRedirect(reverse("view_name")) an HttpResponse which redirect to a view (with its name) but still throw a 403 error I tried to do something like that : class HttpResponseForbiddenRedirect(HttpResponse): def __init__(self, redirect_to): super(HttpResponseForbiddenRedirect, self).__init__() self['Location'] = iri_to_uri(redirect_to) self.status_code = 403 But it didn't work. For some reason I don't understand, I don't get any content It doesn't work because you can't have a 403 response that is also acted upon as

Proper use of HTTP Error Codes. 550 - Why is it 5xx instead of 4xx?

ぐ巨炮叔叔 提交于 2019-12-01 16:49:25
Today a co-worked used a 550 error on a delete action when the user doesn't have permission which at first looked to me bad because as I'm aware of, that kinda error looks like a client (aka 4xx) error to me and not a server (aka 5xx). When looking at the description, it suggest exactly that it was used correctly. Instead of a 401 error, which I was using with some 'problems' before. Problem of 401 error is : If user A is logged in, and try to do an action that returns a 401 it can suggest that you must 'login' since you don't have valid credentials to access that http resource. Problem with

Proper use of HTTP Error Codes. 550 - Why is it 5xx instead of 4xx?

落爺英雄遲暮 提交于 2019-12-01 15:52:15
问题 Today a co-worked used a 550 error on a delete action when the user doesn't have permission which at first looked to me bad because as I'm aware of, that kinda error looks like a client (aka 4xx) error to me and not a server (aka 5xx). When looking at the description, it suggest exactly that it was used correctly. Instead of a 401 error, which I was using with some 'problems' before. Problem of 401 error is : If user A is logged in, and try to do an action that returns a 401 it can suggest

DownloadManager - understanding ERROR_HTTP_DATA_ERROR

≡放荡痞女 提交于 2019-11-30 11:23:34
My application depends heavily on android DownloadManager component to download files with approximate size of 3-10 mega bytes. when scaling up (to millions of downloads) the big picture is clear: ~50% of all downloads are failing due to ERROR_HTTP_DATA_ERROR . I'm getting this info from google analytics according to the documentation, this error code stands for: Value of COLUMN_REASON when an error receiving or processing data occurred at the HTTP level. I found this documentation not very informative. there are plenty of http errors out there. and what about network disconnection in the

Global error handler for any exception

人走茶凉 提交于 2019-11-30 06:19:07
问题 Is there a way to add a global catch-all error handler in which I can change the response to a generic JSON response? I can't use the got_request_exception signal, as it is not allowed to modify the response (http://flask.pocoo.org/docs/0.10/signals/). In contrast all signal handlers are executed in undefined order and do not modify any data. I would prefer to not wrap the app.handle_exception function as that feels like internal API. I guess I'm after something like: @app.errorhandler() def

Rest error message in HTTP Header or Response Body?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 23:08:43
I have a REST service that is exposed to iPhone and Android clients. Currently I follow the HTTP codes 200, 400, 401, 403, 404, 409, 500 etc. My question is where is the recommended place to put the reason/description/cause of the error? Does it make more sense for the REST API to always have custom Reason in the header like so? < HTTP/1.1 400 Bad Request - Missing Required Parameters. < Date: Thu, 20 Dec 2012 01:09:06 GMT < Server: Apache/2.2.22 (Ubuntu) < Connection: close < Transfer-Encoding: chunked Or is it better to have it in the Response Body via JSON? < HTTP/1.1 400 Bad Request < Date

Ajax CORS Request with http 401 in preflight

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 22:52:26
问题 I am struggling for hours now. I want to make a simple ajax request to another domain, but get http 401 Error all the time: jQuery(document).ready(function($){ var challengeid = $('#codepressHook').data('challengeid'); var clicked = false; $('#codepressHook').click(function(){ if(!clicked){ $.ajax({ url: "https://dev.radbonus.com/admin/affiliate-connections/retrieveSingle/"+challengeid+".json", method: "GET", dataType: "json", jsonp: false, contentType: "application/json", xhrFields: {

Global error handler for any exception

前提是你 提交于 2019-11-29 20:52:54
Is there a way to add a global catch-all error handler in which I can change the response to a generic JSON response? I can't use the got_request_exception signal, as it is not allowed to modify the response ( http://flask.pocoo.org/docs/0.10/signals/ ). In contrast all signal handlers are executed in undefined order and do not modify any data. I would prefer to not wrap the app.handle_exception function as that feels like internal API. I guess I'm after something like: @app.errorhandler() def handle_global_error(e): return "Global error" Note the errorhandler does not take any parameters,

Setting errorPage in Umbraco

流过昼夜 提交于 2019-11-29 05:20:23
I am developing a web application using Umbraco. I create a content called PageNotFound and, in the errors section of umbracoSettings.config file, I put the node id of that for 404 error404. The problem is that, with IIS 7, IIS always looks for the HttpErrors section in web.config and does not pay attention to umbracoSettings.config. What should I do? In your web.config (system.webServer section) you can tell the site to pass all of the error handling through to the application: <httpErrors existingResponse="PassThrough" /> This has the disadvantage that Umbraco doesn't handle anything but