simpleweb-support Mailing List for Simple (Page 4)
Brought to you by:
niallg
You can subscribe to this list here.
2004 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
(14) |
May
(22) |
Jun
(15) |
Jul
(9) |
Aug
(2) |
Sep
(7) |
Oct
(4) |
Nov
(2) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(7) |
Feb
(16) |
Mar
(17) |
Apr
|
May
(12) |
Jun
(4) |
Jul
(22) |
Aug
(50) |
Sep
(8) |
Oct
(23) |
Nov
(9) |
Dec
(50) |
2006 |
Jan
(6) |
Feb
(7) |
Mar
(8) |
Apr
(3) |
May
(13) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(7) |
2007 |
Jan
(11) |
Feb
(3) |
Mar
(17) |
Apr
(21) |
May
(9) |
Jun
(4) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(14) |
Dec
(3) |
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(4) |
Aug
(4) |
Sep
(15) |
Oct
(9) |
Nov
(6) |
Dec
(2) |
2009 |
Jan
(29) |
Feb
(2) |
Mar
(8) |
Apr
(14) |
May
(4) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(7) |
2010 |
Jan
|
Feb
(2) |
Mar
(61) |
Apr
(9) |
May
(10) |
Jun
(9) |
Jul
(10) |
Aug
(7) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(11) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(4) |
Oct
|
Nov
(6) |
Dec
(9) |
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(3) |
May
(2) |
Jun
|
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(5) |
2013 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(12) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2014 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
|
May
|
Jun
(20) |
Jul
(12) |
Aug
(4) |
Sep
(3) |
Oct
(5) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Laurent <lma...@sm...> - 2013-04-09 20:11:58
|
Hi, Here's an example from the tutorial. You might want to read it http://www.simpleframework.org/doc/tutorial/tutorial.php public static void main(String[] list) throws Exception { Container container= new HelloWorld(); Server server= new ContainerServer(container); Connection connection= new SocketConnection(server); SocketAddress address= new InetSocketAddress(8080); connection.connect(address); } Regards, Laurent Marchal On 4/9/13 11:38 AM, Dave Alvarado wrote: > Hi, > > I'm using the latest version of the Simple framework. How do I > customize the port on which my server listens? It seems to be 8080 by > default, but that port is being used by something else on my system. > I'm using the server creation from the example: > > public class TestContainer implements Container { > > > public void handle(Request request, Response response) { > > try { > > final PrintStream body = response.getPrintStream(); > > long time = System.currentTimeMillis(); > > response.set("Content-Type", "text/plain"); > > response.set("Server", "Test/1.0 (Simple 4.0)"); > > response.setDate("Date", time); > > response.setDate("Last-Modified", time); > > body.println("Hello World"); > > body.close(); > > } catch(Exception e) { > > e.printStackTrace(); > > } > > } > > > } > > > Thanks, - Dave > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Dave A. <lar...@ms...> - 2013-04-09 16:38:38
|
Hi, I'm using the latest version of the Simple framework. How do I customize the port on which my server listens? It seems to be 8080 by default, but that port is being used by something else on my system. I'm using the server creation from the example: public class TestContainer implements Container { public void handle(Request request, Response response) { try { final PrintStream body = response.getPrintStream(); long time = System.currentTimeMillis(); response.set("Content-Type", "text/plain"); response.set("Server", "Test/1.0 (Simple 4.0)"); response.setDate("Date", time); response.setDate("Last-Modified", time); body.println("Hello World"); body.close(); } catch(Exception e) { e.printStackTrace(); } } } Thanks, - Dave |
From: Christophe R. <cr...@ac...> - 2013-04-09 13:19:08
|
Hello, In the last 5.1 in class ResponseWrapper you have: public String getValue(String name, int index) { return getValue(name, index); } it should be: public String getValue(String name, int index) { return response.getValue(name, index); } Christophe -- Christophe Roudet |
From: Darwin A. <dar...@gm...> - 2013-02-28 02:01:03
|
Aloha, again. Is there a complete, working file upload (to disk, not memory) example available, by any chance? Have a great day. Take care, Darwin |
From: Darwin A. <dar...@gm...> - 2013-02-28 01:19:43
|
Aloha! Has the performance of Simple been compared with that of Tomcat, by any chance? Take care, Darwin |
From: -=}\\*/{=- <rui...@gm...> - 2013-02-06 05:24:49
|
i did not understand the question... at all. ... what do you call "handle"? what "interfaces" are you talking about? maybe i'am too sleepy here (3 am), but this piece of code seams just fine to me... it actually compiles here, your bug, whatever may be, is probably somewhere else. ... appears to me that you should read something like: http://www.mindview.net/Books/TIJ/ []r. this compile just fine: import java.io.PrintStream; import java.net.InetSocketAddress; import java.net.SocketAddress; import org.simpleframework.http.Request; import org.simpleframework.http.Response; import org.simpleframework.http.core.Container; import org.simpleframework.http.core.ContainerServer; import org.simpleframework.transport.Server; import org.simpleframework.transport.connect.Connection; import org.simpleframework.transport.connect.SocketConnection; public class http_responder implements Container { private http_responder container; private Server server; private Connection connection; private SocketAddress address; private Object horsecounter; public void handle(Request request, Response response) { try { PrintStream body = response.getPrintStream(); long time = System.currentTimeMillis(); response.setValue("Content-Type", "text/plain"); response.setValue("Server", "HelloWorld/1.0 (Simple 5.0.4)"); response.setDate("Date", time); response.setDate("Last-Modified", time); body.println("Horses in Barn: " + horsecounter);//.GetNumberOfHorses()); body.close(); } catch(Exception e) { e.printStackTrace(); } } public void serveit(Object horsecounter) throws Exception { this.container = new http_responder(); this.server = new ContainerServer((Container) container); this.connection = new SocketConnection(server); this.address = new InetSocketAddress(8080); this.horsecounter = horsecounter; this.connection.connect(address); } } On 2 February 2013 03:43, Lisa Carver <car...@ym...> wrote: > I'm using the simpleframework for a little utility. > > Here's the scenario. > > In one thread I have a horse counter. It keeps track of how many horses > are in a barn. > > In the other thread I have the simple webserver. > > public class http_responder implements Container { > private http_responder container; > private Server server; > private Connection connection; > private SocketAddress address; > private HorseCounter horsecounter; > > public void handle(Request request, Response response) { > try { > PrintStream body = response.getPrintStream(); > long time = System.currentTimeMillis(); > > response.setValue("Content-Type", "text/plain"); > response.setValue("Server", "HelloWorld/1.0 (Simple 5.0.4)"); > response.setDate("Date", time); > response.setDate("Last-Modified", time); > body.println("Horses in Barn: " + > horsecounter.GetNumberOfHorses()); > body.close(); > } catch(Exception e) { > e.printStackTrace(); > } > } > > public void serveit(HorseCounter horsecounter) throws Exception { > this.container = new http_responder(); > this.server = new ContainerServer((Container) container); > this.connection = new SocketConnection(server); > this.address = new InetSocketAddress(8080); > this.horsecounter = horsecounter; > this.connection.connect(address); > > } > > } > My question is: How do I get my horsecounter passed into the handle? > > I tried passing it as a variable to the serveit method, but I just figured > out that interfaces can't hold variables. (I'm new to Java) It makes > sense to me why it didn't work, but I'm still in the dark as to how to > serve up dynamic content using variables in my running application. > > I've looked through the JavaDocs, but I got overwhelmed pretty quickly. > Would you mind pointing me in the right direction? > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > |
From: Lisa C. <car...@ym...> - 2013-02-02 03:43:41
|
I'm using the simpleframework for a little utility. Here's the scenario. In one thread I have a horse counter. It keeps track of how many horses are in a barn. In the other thread I have the simple webserver. public class http_responder implements Container { private http_responder container; private Server server; private Connection connection; private SocketAddress address; private HorseCounter horsecounter; public void handle(Request request, Response response) { try { PrintStream body = response.getPrintStream(); long time = System.currentTimeMillis(); response.setValue("Content-Type", "text/plain"); response.setValue("Server", "HelloWorld/1.0 (Simple 5.0.4)"); response.setDate("Date", time); response.setDate("Last-Modified", time); body.println("Horses in Barn: " + horsecounter.GetNumberOfHorses()); body.close(); } catch(Exception e) { e.printStackTrace(); } } public void serveit(HorseCounter horsecounter) throws Exception { this.container = new http_responder(); this.server = new ContainerServer((Container) container); this.connection = new SocketConnection(server); this.address = new InetSocketAddress(8080); this.horsecounter = horsecounter; this.connection.connect(address); } } My question is: How do I get my horsecounter passed into the handle? I tried passing it as a variable to the serveit method, but I just figured out that interfaces can't hold variables. (I'm new to Java) It makes sense to me why it didn't work, but I'm still in the dark as to how to serve up dynamic content using variables in my running application. I've looked through the JavaDocs, but I got overwhelmed pretty quickly. Would you mind pointing me in the right direction? |
From: Niall G. <gal...@ya...> - 2013-01-27 00:19:58
|
I did not use any profiler, to measure stats like this you should avoid a profiler unless you want specific metrics on parts of the server. I used Faban and ApacheBench to gather statistics. I am afraid I do not have much time right now to create scripts, however the site for Faban is quite good and ApacheBench is very simple to use. Another good free tool is httperf, however I have not used it in quite a while. --- On Fri, 25/1/13, Tom Denley <t.d...@ca...> wrote: > From: Tom Denley <t.d...@ca...> > Subject: [Simpleweb-Support] Performance > To: sim...@li... > Received: Friday, 25 January, 2013, 1:46 PM > I'm trying to look deeper at the > relative performance of simple-web. > > I'd like to start by reproducing the stats you publish at > http://www.simpleframework.org/performance/comparison.php > and wondered > whether you could make the scripts and codebases available > for the > three servers that you benchmark. Also, what profiler > did you use to > gather your metrics data? > > Regards, > > -- > Tom Denley > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, > HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your > skills current > with LearnDevNow - 3,200 step-by-step video tutorials by > Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Tom D. <t.d...@ca...> - 2013-01-25 21:46:15
|
I'm trying to look deeper at the relative performance of simple-web. I'd like to start by reproducing the stats you publish at http://www.simpleframework.org/performance/comparison.php and wondered whether you could make the scripts and codebases available for the three servers that you benchmark. Also, what profiler did you use to gather your metrics data? Regards, -- Tom Denley |
From: Niall G. <gal...@ya...> - 2012-12-14 08:51:51
|
Ah well spotted, I must have missed this during a refactor. I have fixed this and will release the change. Thanks, Niall --- On Thu, 13/12/12, Christophe Roudet <cr...@ac...> wrote: > From: Christophe Roudet <cr...@ac...> > Subject: [Simpleweb-Support] FileAllocator and FixedConsummer > To: sim...@li... > Received: Thursday, 13 December, 2012, 8:56 AM > Hi, > > It looks like a temporary file (FileBuffer) is always > created even if > the request has a content length. > > I have modified the append() method in FixedConsummer where > I pass the > limit to the allocator: > > private void append(byte[] array, int off, int len) throws > IOException { > if(buffer == null) { > buffer = > allocator.allocate(limit); // limit added > } > buffer.append(array, off, > len); > } > > Then a file will be created only if the content-length > exceeds the limit. > > I just wonder if this is safe? > > Thanks, > > Christophe > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. > Free Trial > Remotely access PCs and mobile devices and provide instant > support > Improve your efficiency, and focus on delivering more > value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Christophe R. <cr...@ac...> - 2012-12-13 17:09:44
|
Hi, It looks like a temporary file (FileBuffer) is always created even if the request has a content length. I have modified the append() method in FixedConsummer where I pass the limit to the allocator: private void append(byte[] array, int off, int len) throws IOException { if(buffer == null) { buffer = allocator.allocate(limit); // limit added } buffer.append(array, off, len); } Then a file will be created only if the content-length exceeds the limit. I just wonder if this is safe? Thanks, Christophe |
From: -=}\\*/{=- <rui...@gm...> - 2012-12-11 21:24:38
|
nice... just like you said...copied the files and added this method to my request: public Session getSession(boolean create) { try { Session s = null; Cookie sc = (sessionNewCookie != null) ? sessionNewCookie : getCookie(sessionId); if (sc != null) { s = sessionProvider.open(sc.getValue(), sessionKeepAlive); if (s != null) return s; } if (create) { String uuid = UUID.randomUUID().toString(); sc = new Cookie(sessionId, uuid, true); s = sessionProvider.open(sc.getValue(), true); reply.getResponse().setCookie(sc); sessionNewCookie = sc; return s; } } catch (LeaseException ex) { logT(ex, "While getting the session."); } return null; } works nice, ty, :) []r. On 10 December 2012 21:18, Niall Gallagher <gal...@ya...>wrote: > Yep, it should be very easy to just copy the package across. I dropped > this package because its not really related to HTTP, and I always found > that I had to implement my own more complicated session handling system > anyway. > > --- On Mon, 10/12/12, -=}\*/{=- <rui...@gm...> wrote: > > > From: -=}\*/{=- <rui...@gm...> > > Subject: [Simpleweb-Support] sessions... > > To: "Simple support and user issues" < > sim...@li...> > > Received: Monday, 10 December, 2012, 12:42 PM > > hi, > > i just upgraded to the newest version and just > > noticed that the session feature has been removed from the > > version i was using. > > the server i'm implementing was using that > > feature. > > > > > > i started to look at the old sources to see if i > > could migrate the code... would it be easy? > > i don't mind implementing my > > own approach to the problem... the thing is that i > > don't know how to detect the same session between > > requests... is it thought cookies? some other way to know if > > is the same client? > > > > > > best wishes, rui > > > > -----Inline Attachment Follows----- > > > > > ------------------------------------------------------------------------------ > > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. > > Free Trial > > Remotely access PCs and mobile devices and provide instant > > support > > Improve your efficiency, and focus on delivering more > > value-add services > > Discover what IT Professionals Know. Rescue delivers > > http://p.sf.net/sfu/logmein_12329d2d > > -----Inline Attachment Follows----- > > > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Niall G. <gal...@ya...> - 2012-12-10 21:18:10
|
Yep, it should be very easy to just copy the package across. I dropped this package because its not really related to HTTP, and I always found that I had to implement my own more complicated session handling system anyway. --- On Mon, 10/12/12, -=}\*/{=- <rui...@gm...> wrote: > From: -=}\*/{=- <rui...@gm...> > Subject: [Simpleweb-Support] sessions... > To: "Simple support and user issues" <sim...@li...> > Received: Monday, 10 December, 2012, 12:42 PM > hi, > i just upgraded to the newest version and just > noticed that the session feature has been removed from the > version i was using. > the server i'm implementing was using that > feature. > > > i started to look at the old sources to see if i > could migrate the code... would it be easy? > i don't mind implementing my > own approach to the problem... the thing is that i > don't know how to detect the same session between > requests... is it thought cookies? some other way to know if > is the same client? > > > best wishes, rui > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. > Free Trial > Remotely access PCs and mobile devices and provide instant > support > Improve your efficiency, and focus on delivering more > value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > -----Inline Attachment Follows----- > > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: -=}\\*/{=- <rui...@gm...> - 2012-12-10 20:43:16
|
hi, i just upgraded to the newest version and just noticed that the session feature has been removed from the version i was using. the server i'm implementing was using that feature. i started to look at the old sources to see if i could migrate the code... would it be easy? i don't mind implementing my own approach to the problem... the thing is that i don't know how to detect the same session between requests... is it thought cookies? some other way to know if is the same client? best wishes, rui |
From: Rastislav K. <kas...@gm...> - 2012-11-12 22:07:20
|
Maybe I'm out of picture a bit, but isn't this matter of your own code in connection setup? You know, once the connection is opened, it doesn't know, if it's secure or not. The scheme should be either http or https. But you have to decide if you want to listen on HTTP or HTTPS when performing SocketConnection.connect(), see: http://www.simpleframework.org/doc/javadoc/org/simpleframework/transport/connect/SocketConnection.html If you want to listen on both ports (80 and 443), then just create 2 Container wrappers, make them carry instance variable scheme = (http|https) and let them call your own handleWithScheme(String scheme, Request request, Response response) on wrapper container. Protocode as follows: interface SchemedContainer { public void handleWithScheme(String scheme, Request req, Response resp); } class SchemeContainerWrapper implements Container { private String scheme; private SchemeContainer wrappedContainer; public void handle(Request req, Response resp) { wrappedContainer.handleWithScheme(scheme, req, resp); } } schemeContainer = <some> SchemeContainer; httpContainer = new SchemeContainerWrapper('http', schemeContainer); httpConnection = new SocketConnection(httpContainer); httpConnection.connect(address); httpsContainer = new SchemeContainerWrapper('https', schemeContainer); httpsConnection = new SocketConnection(httpsContainer); httpsConnection.connect(address, sslContext); Or you can do it implementing request wrapper without introducing SchemedContainer, use what better suites your scenario. Hope this helps. Extend as you wish (multiple listening addresses, ports, etc,...), you get the idea. RK On Mon, Nov 12, 2012 at 9:50 PM, Tom Denley <t.d...@ca...> wrote: > Thanks Rastislav, > > I guess that makes sense. > > My question still remains though: what mechanism does Simple support > for determining the scheme of the request? > > Regards, > > -- Tom > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Petite A. <pet...@me...> - 2012-11-12 21:40:48
|
On Nov 12, 2012, at 9:50 PM, Tom Denley <t.d...@ca...> wrote: > My question still remains though: what mechanism does Simple support > for determining the scheme of the request? As far as HTTP goes… there is no way to tell… Your best bet is as follow: (1) Fully qualified request URI (2) Host header (3) There is no number (3) So, you can get the domain and port from (1) or (2). And infer the scheme somehow by looking if you have a TLS connection or something. In short, you will need some, err, heuristics to sort this one out. Oh, well... |
From: Tom D. <t.d...@ca...> - 2012-11-12 20:50:43
|
Thanks Rastislav, I guess that makes sense. My question still remains though: what mechanism does Simple support for determining the scheme of the request? Regards, -- Tom |
From: Rastislav K. <kas...@gm...> - 2012-11-11 00:12:47
|
I guess this works in case of first line of request looking like this one: GET http://host:port/path?query HTTP/1.1 Which is pretty common in case of forward proxy (request from client to forward proxy). On Sun, Nov 11, 2012 at 12:53 AM, Tom Denley <t.d...@ca...> wrote: > --- On Sat, 10/11/12, Niall Gallagher <gallagher_niall@...> wrote: >> You have to get it from the "Host" header, its required for HTTP/1.1 however HTTP/1.0 requests might not have it. Just do Request.get("Host"). > > > Thanks for your advice (I assume you mean Request.getValue("Host"), > which should let me get the domain and port), but I'm still not sure > how to determine the scheme. > > I'm also a little confused by the JavaDoc, which states: > > http://www.simpleframework.org/doc/javadoc/org/simpleframework/http/RequestLine.html#getAddress%28%29 > > Address getAddress() > > This is used to acquire the address from the request line. An > address is the full URI including the scheme, domain, port and the > query parts. > > Perhaps I'm missing something, but this seems like exactly what I > need, but most of the returned Address values are null. > > Thanks, > Tom Denley > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Tom D. <t.d...@ca...> - 2012-11-10 23:53:23
|
--- On Sat, 10/11/12, Niall Gallagher <gallagher_niall@...> wrote: > You have to get it from the "Host" header, its required for HTTP/1.1 however HTTP/1.0 requests might not have it. Just do Request.get("Host"). Thanks for your advice (I assume you mean Request.getValue("Host"), which should let me get the domain and port), but I'm still not sure how to determine the scheme. I'm also a little confused by the JavaDoc, which states: http://www.simpleframework.org/doc/javadoc/org/simpleframework/http/RequestLine.html#getAddress%28%29 Address getAddress() This is used to acquire the address from the request line. An address is the full URI including the scheme, domain, port and the query parts. Perhaps I'm missing something, but this seems like exactly what I need, but most of the returned Address values are null. Thanks, Tom Denley |
From: Niall G. <gal...@ya...> - 2012-11-10 21:55:13
|
Hi, I have not had a chance to finish an implementation of WebSockets, however it is in the pipeline. The changes here are primarily structural and will help when moving forward with various other features. The biggest enhancement is something called tracing that enables you to trace all events that occur on individual connected sockets. This is something that was badly needed. Niall --- On Sat, 10/11/12, Andrew Barlow <and...@sd...> wrote: > From: Andrew Barlow <and...@sd...> > Subject: Re: [Simpleweb-Support] Unable to get scheme/port/domain from incoming Request > To: "Simple support and user issues" <sim...@li...> > Received: Saturday, 10 November, 2012, 5:48 AM > Hi Niall > Websockets?! > > Andy Barlow - Chief Technology > Officer - MBCS CENG EURING CITP > > e: and...@sd...t: +44 (0)7830 302 > 268 > > The information in this email or facsimile is > confidential and is intended solely for the addressee(s) and > access to this email or facsimile by anyone else is > unauthorised. If you are not the intended recipient then any > disclosure, copying, distribution or any action taken or > omitted to be taken in reliance on it, is prohibited and may > be unlawful. Information expressed in this email or > facsimile is not given or endorsed by my firm or employer > unless otherwise indicated by an authorised representative > independent of this message. > > > On 10 Nov 2012, at 13:29, Niall Gallagher <gal...@ya...> > wrote: > Also just an FYI, Ill be releasing Simple HTTP > 5.0 within a week or two, although its pretty much the same, > there are some noticeable differences that may break > existing code written on the 4.x versions. > > --- On Sat, 10/11/12, Niall Gallagher <gal...@ya...> > wrote: > > From: Niall Gallagher <gal...@ya...> > Subject: Re: [Simpleweb-Support] Unable to get > scheme/port/domain from incoming Request > To: "Simple support and user issues" <sim...@li...> > Received: Saturday, 10 November, 2012, 5:25 AM > You have to get it from the "Host" > header, its required for HTTP/1.1 however HTTP/1.0 requests > might not have it. Just do Request.get("Host"). > > --- On Sat, 10/11/12, Tom Denley <t.d...@ca...> > wrote: > > From: Tom Denley <t.d...@ca...> > Subject: [Simpleweb-Support] Unable to get > scheme/port/domain from incoming Request > To: sim...@li... > Received: Saturday, 10 November, 2012, 2:43 AM > Hi, > > I'm trying to develop a Clojure ring adapter for > Simple, > and I'm having trouble > determining the http scheme, > server hostname, and server port for incoming Simple > Requests. > > I find that each of the following returns null: > > > request.getAddress().getScheme() > request.getAddress().getDomain() > request.getAddress().getPort() > > I'd appreciate any advice. > > If you are able to read Clojure code, and think it > might > help, then my source is on GitHub > here: > > > https://github.com/netmelody/ring-simpleweb-adapter/blob/master/src/ring/adapter/simpleweb.clj > > Regards, > > Tom Denley > > > -----Inline Attachment Follows----- > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do > we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > -----Inline Attachment Follows----- > > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > -----Inline Attachment Follows----- > > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Andrew B. <and...@sd...> - 2012-11-10 14:42:47
|
Hi Niall Websockets?! Andy Barlow - Chief Technology Officer - MBCS CENG EURING CITP e: and...@sd... t: +44 (0)7830 302 268 The information in this email or facsimile is confidential and is intended solely for the addressee(s) and access to this email or facsimile by anyone else is unauthorised. If you are not the intended recipient then any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Information expressed in this email or facsimile is not given or endorsed by my firm or employer unless otherwise indicated by an authorised representative independent of this message. On 10 Nov 2012, at 13:29, Niall Gallagher <gal...@ya...> wrote: > Also just an FYI, Ill be releasing Simple HTTP 5.0 within a week or two, although its pretty much the same, there are some noticeable differences that may break existing code written on the 4.x versions. > > --- On Sat, 10/11/12, Niall Gallagher <gal...@ya...> wrote: > >> From: Niall Gallagher <gal...@ya...> >> Subject: Re: [Simpleweb-Support] Unable to get scheme/port/domain from incoming Request >> To: "Simple support and user issues" <sim...@li...> >> Received: Saturday, 10 November, 2012, 5:25 AM >> You have to get it from the "Host" >> header, its required for HTTP/1.1 however HTTP/1.0 requests >> might not have it. Just do Request.get("Host"). >> >> --- On Sat, 10/11/12, Tom Denley <t.d...@ca...> >> wrote: >> >>> From: Tom Denley <t.d...@ca...> >>> Subject: [Simpleweb-Support] Unable to get >> scheme/port/domain from incoming Request >>> To: sim...@li... >>> Received: Saturday, 10 November, 2012, 2:43 AM >>> Hi, >>> >>> I'm trying to develop a Clojure ring adapter for >> Simple, >>> and I'm having trouble determining the http scheme, >>> server hostname, and server port for incoming Simple >>> Requests. >>> >>> I find that each of the following returns null: >>> >>> >>> request.getAddress().getScheme() >>> request.getAddress().getDomain() >>> request.getAddress().getPort() >>> >>> I'd appreciate any advice. >>> >>> If you are able to read Clojure code, and think it >> might >>> help, then my source is on GitHub here: >>> >>> >>> https://github.com/netmelody/ring-simpleweb-adapter/blob/master/src/ring/adapter/simpleweb.clj >>> >>> Regards, >>> >>> Tom Denley >>> >>> >>> -----Inline Attachment Follows----- >>> >>> >> ------------------------------------------------------------------------------ >>> Everyone hates slow websites. So do we. >>> Make your web apps faster with AppDynamics >>> Download AppDynamics Lite for free today: >>> http://p.sf.net/sfu/appdyn_d2d_nov >>> -----Inline Attachment Follows----- >>> >>> _______________________________________________ >>> Simpleweb-Support mailing list >>> Sim...@li... >>> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >>> >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_nov >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Niall G. <gal...@ya...> - 2012-11-10 13:29:31
|
Also just an FYI, Ill be releasing Simple HTTP 5.0 within a week or two, although its pretty much the same, there are some noticeable differences that may break existing code written on the 4.x versions. --- On Sat, 10/11/12, Niall Gallagher <gal...@ya...> wrote: > From: Niall Gallagher <gal...@ya...> > Subject: Re: [Simpleweb-Support] Unable to get scheme/port/domain from incoming Request > To: "Simple support and user issues" <sim...@li...> > Received: Saturday, 10 November, 2012, 5:25 AM > You have to get it from the "Host" > header, its required for HTTP/1.1 however HTTP/1.0 requests > might not have it. Just do Request.get("Host"). > > --- On Sat, 10/11/12, Tom Denley <t.d...@ca...> > wrote: > > > From: Tom Denley <t.d...@ca...> > > Subject: [Simpleweb-Support] Unable to get > scheme/port/domain from incoming Request > > To: sim...@li... > > Received: Saturday, 10 November, 2012, 2:43 AM > > Hi, > > > > I'm trying to develop a Clojure ring adapter for > Simple, > > and I'm having trouble determining the http scheme, > > server hostname, and server port for incoming Simple > > Requests. > > > > I find that each of the following returns null: > > > > > > request.getAddress().getScheme() > > request.getAddress().getDomain() > > request.getAddress().getPort() > > > > I'd appreciate any advice. > > > > If you are able to read Clojure code, and think it > might > > help, then my source is on GitHub here: > > > > > > https://github.com/netmelody/ring-simpleweb-adapter/blob/master/src/ring/adapter/simpleweb.clj > > > > Regards, > > > > Tom Denley > > > > > > -----Inline Attachment Follows----- > > > > > ------------------------------------------------------------------------------ > > Everyone hates slow websites. So do we. > > Make your web apps faster with AppDynamics > > Download AppDynamics Lite for free today: > > http://p.sf.net/sfu/appdyn_d2d_nov > > -----Inline Attachment Follows----- > > > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Niall G. <gal...@ya...> - 2012-11-10 13:25:16
|
You have to get it from the "Host" header, its required for HTTP/1.1 however HTTP/1.0 requests might not have it. Just do Request.get("Host"). --- On Sat, 10/11/12, Tom Denley <t.d...@ca...> wrote: > From: Tom Denley <t.d...@ca...> > Subject: [Simpleweb-Support] Unable to get scheme/port/domain from incoming Request > To: sim...@li... > Received: Saturday, 10 November, 2012, 2:43 AM > Hi, > > I'm trying to develop a Clojure ring adapter for Simple, > and I'm having trouble determining the http scheme, > server hostname, and server port for incoming Simple > Requests. > > I find that each of the following returns null: > > > request.getAddress().getScheme() > request.getAddress().getDomain() > request.getAddress().getPort() > > I'd appreciate any advice. > > If you are able to read Clojure code, and think it might > help, then my source is on GitHub here: > > > https://github.com/netmelody/ring-simpleweb-adapter/blob/master/src/ring/adapter/simpleweb.clj > > Regards, > > Tom Denley > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > -----Inline Attachment Follows----- > > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Tom D. <t.d...@ca...> - 2012-11-10 10:43:31
|
Hi, I'm trying to develop a Clojure ring adapter for Simple, and I'm having trouble determining the http scheme, server hostname, and server port for incoming Simple Requests. I find that each of the following returns null: request.getAddress().getScheme() request.getAddress().getDomain() request.getAddress().getPort() I'd appreciate any advice. If you are able to read Clojure code, and think it might help, then my source is on GitHub here: https://github.com/netmelody/ring-simpleweb-adapter/blob/master/src/ring/adapter/simpleweb.clj Regards, Tom Denley |
From: Niall G. <gal...@ya...> - 2012-07-18 08:56:45
|
I am not sure how this works, but if its HTTP compliant I can see no reason it would not work. --- On Tue, 17/7/12, Andrew Barlow <and...@de...> wrote: > From: Andrew Barlow <and...@de...> > Subject: [Simpleweb-Support] File upload progress > To: sim...@li... > Received: Tuesday, 17 July, 2012, 4:47 AM > I wondered if the built in file > upload mechanism for Simple would work with client-side > upload "widgets" to show progress bars, etc. > > For example http://blueimp.github.com/jQuery-File-Upload/. > > Also, has anyone looked at being able to resume stalled or > partial uploads, and how this might be achieved with > Simple? > Regards, > Andy Barlow > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's > security and > threat landscape has changed and how IT managers can > respond. Discussions > will include endpoint security, mobile security and the > latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |