localhost

ERR_CONTENT_LENGTH_MISMATCH on nginx and proxy on Chrome when loading large files

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting the following error on my chrome console: GET http://localhost/grunt/vendor/angular/angular.js net::ERR_CONTENT_LENGTH_MISMATCH This only happens when a simultaneous requests are shot towards nginx e.g. when the browsers cache is empty and the whole app loads. Loading the resource above as a single requests succeeds. Here are the headers to this requests, copied from Chrome: Remote Address:127.0.0.1:80 Request URL:http://localhost/grunt/vendor/angular/angular.js Request Method:GET Status Code:200 OK Request Headersview source

Postgresql : Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections [duplicate]

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: Connection refused (PGError) (postgresql and rails) 4 answers I am trying to connect postgresql but I am getting this error. org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. My pg_hba.conf file is like this. TYPE DATABASE USER CIDR-ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 I would be much obliged if anyone please be

redirect in grails

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am redirecting an uploaded image in grails like so: Controller: def upload() { def f = request.getFile('myFile') if (f == null | f.empty) { flash.default = "file cannot be empty" errors.getFieldError("cannot be empty") return } def fName = f.getOriginalFilename() def picture = new Picture(orgName: fName, urlOrg: "http://localhost/"+fName) f.transferTo(new File('/Users/sagarmichael/Desktop/photoUpload/'+fName)) println("saved") redirect(action: 'test', params: [url1:picture.urlOrg] ) } def test(){ System.out.println(params.url1) [url1

How to create a https server on localhost

不问归期 提交于 2019-12-03 02:40:26
问题 I followed the tutorial below to create a https server https://docs.nodejitsu.com/articles/HTTP/servers/how-to-create-a-HTTPS-server/ and the program runs without errors but when I can not open https://localhost:8000 in my chrome it always get a ERR_SSL_PROTOCOL_ERROR 回答1: Well one quick way to do this is with ngrok. It's really easy to use and only takes few secs to run. It is as simple as downloading your system version. Unzip and run ngrok.exe . It will open a command line type of window.

Can't connect to my tomcat 8 websocket

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have written a client program that connects to my websocket on the server. I set up tomcat8 with the examples working and hit the EchoAnnotation endpoint with my client program. I wrote this endpoint program as follows: @ServerEndpoint(value = "/websocket") public class PortServer implements AirMessageListener { public PortServer() { } @OnOpen public void start(Session session) { //do stuff } @OnClose public void end() { //do stuff } } @OnMessage public void incoming(String message) { //do stuff } @OnError public void onError(Throwable tw)

Angular2/Angular seed http-proxy-middleware proxy api requests

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Im using the Angular Seed project and trying to set up a proxy for api requests for a backend service that is running on a different port. My code so far: /* Add proxy middleware */ this.PROXY_MIDDLEWARE = [ require('http-proxy-middleware')({ ws: false, target: 'http://localhost:5555', router: { // when request.headers.host == 'dev.localhost:3000', // override target 'http://www.example.org' to 'http://localhost:8000' //'http://localhost:5555/basepath/api' : 'http://localhost:7000/api' } }) ]; Basically what I need to do is route any api

undertow multiple webservices url

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want something like this on my address. How I can bind servlet1, servlet2, servlet3 to localhost:8080 so I can have different url to call such as localhost:8080/servlet localhost:8080/servlet1 localhost:8080/servlet2 localhost:8080/servlet3 I have this code that only work for thw last url(servlet) added DeploymentInfo servletBuilder = deployment() .setClassLoader(ServletServer.class.getClassLoader()) .setContextPath(MYAPP) .setDeploymentName("test.war") .addServlets( servlet(servletName, x) .addInitParam("message", output) .addMapping("/"

Kafka consumer with new API not working

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I found something very weird with Kafka. I have a producer with 3 brokers : bin/kafka-console-producer.sh --broker-list localhost:9093, localhost:9094, localhost:9095 --topic topic Then I try to run a consumer with the new API : bin/kafka-console-consumer.sh --bootstrap-server localhost:9093,localhost:9094,localhost:9095 --topic topic --from-beginning I got nothing ! BUT if I use the old API : bin/kafka-console-consumer.sh --zookeeper localhost:2181 --from-beginning --topic topic I got my messages ! What is wrong with me ? PS : I am using

EXCEPTION: Runtime compiler is not loaded

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Versions. @angular/cli@1.0.0-rc.2 Repro steps. ng build -prod -e prod The log given by the failure. vendor . 380a744 …. bundle . js : 218 Error : Runtime compiler is not loaded at new Error ( native ) at Error . d ( http : //localhost:9000/portal/assets/dist/polyfills.a61f849adcea6ec74b69.bundle.js:36:1731) at r ( http : //localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:1410:3338) at t . compileModuleAndAllComponentsAsync ( http : //localhost:9000/portal/assets/dist/vendor.380a74466a8bf08fbdda.bundle.js:1417

Why HTML tag is searchable even if it was filtered in elastic search

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am new to elasticsearch and was testing html_strip filter. Ideally I should not be able to search on HTML tags. Following is steps. Index: curl -XPOST 'localhost:9200/foo/test/_analyzer?tokenizer=standard&char_filters=html_strip' -d ' { "content" : "<title>Dilip Kumar</title>" }' Search: http://localhost:9200/foo/test/_search?tokenizer=standard&char_filters=html_strip&q=title Result: { "took": 3, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 1, "max_score": 0.2169777, "hits": [ { "_index":