You can subscribe to this list here.
2005 |
Jan
|
Feb
(53) |
Mar
(62) |
Apr
(88) |
May
(55) |
Jun
(204) |
Jul
(52) |
Aug
|
Sep
(1) |
Oct
(94) |
Nov
(15) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(130) |
Feb
(105) |
Mar
(34) |
Apr
(61) |
May
(41) |
Jun
(92) |
Jul
(176) |
Aug
(102) |
Sep
(247) |
Oct
(69) |
Nov
(32) |
Dec
(140) |
2007 |
Jan
(58) |
Feb
(51) |
Mar
(11) |
Apr
(20) |
May
(34) |
Jun
(37) |
Jul
(18) |
Aug
(60) |
Sep
(41) |
Oct
(105) |
Nov
(19) |
Dec
(14) |
2008 |
Jan
(3) |
Feb
|
Mar
(7) |
Apr
(5) |
May
(123) |
Jun
(5) |
Jul
(1) |
Aug
(29) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(3) |
2009 |
Jan
|
Feb
(36) |
Mar
(29) |
Apr
|
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(4) |
Oct
|
Nov
(13) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(9) |
Apr
(11) |
May
(16) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(92) |
Nov
(28) |
Dec
(16) |
2013 |
Jan
(9) |
Feb
(2) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(6) |
Jul
(14) |
Aug
(12) |
Sep
(4) |
Oct
(13) |
Nov
(1) |
Dec
(6) |
2014 |
Jan
(23) |
Feb
(19) |
Mar
(10) |
Apr
(14) |
May
(11) |
Jun
(6) |
Jul
(11) |
Aug
(15) |
Sep
(41) |
Oct
(95) |
Nov
(23) |
Dec
(11) |
2015 |
Jan
(3) |
Feb
(9) |
Mar
(19) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
|
2016 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(1) |
May
(3) |
Jun
(17) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(19) |
Nov
(12) |
Dec
(6) |
2017 |
Jan
(30) |
Feb
(23) |
Mar
(12) |
Apr
(32) |
May
(27) |
Jun
(7) |
Jul
(13) |
Aug
(16) |
Sep
(6) |
Oct
(11) |
Nov
|
Dec
(12) |
2018 |
Jan
(1) |
Feb
(5) |
Mar
(6) |
Apr
(7) |
May
(23) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(6) |
Oct
(6) |
Nov
(10) |
Dec
(3) |
2019 |
Jan
(26) |
Feb
(15) |
Mar
(9) |
Apr
|
May
(8) |
Jun
(14) |
Jul
(10) |
Aug
(10) |
Sep
(4) |
Oct
(2) |
Nov
(20) |
Dec
(10) |
2020 |
Jan
(10) |
Feb
(14) |
Mar
(29) |
Apr
(11) |
May
(25) |
Jun
(21) |
Jul
(23) |
Aug
(12) |
Sep
(19) |
Oct
(6) |
Nov
(8) |
Dec
(12) |
2021 |
Jan
(29) |
Feb
(9) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
(2) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(4) |
Nov
(12) |
Dec
(13) |
2022 |
Jan
(4) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(15) |
Jun
(7) |
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2023 |
Jan
(15) |
Feb
|
Mar
(23) |
Apr
(1) |
May
(2) |
Jun
(10) |
Jul
|
Aug
(22) |
Sep
(19) |
Oct
(2) |
Nov
(20) |
Dec
|
2024 |
Jan
(1) |
Feb
|
Mar
(16) |
Apr
(15) |
May
(6) |
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(13) |
Nov
(18) |
Dec
(6) |
2025 |
Jan
(12) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Zoran V. <zv...@ar...> - 2005-06-10 17:11:56
|
Hi friends, As we discuss that much, wouldn't it be faster/easier/better to go to some chatroom on AIM or elsewhere? Zoran |
From: Vlad S. <vl...@cr...> - 2005-06-10 17:10:42
|
Good call, i will move. Until we find good way for determining file paths, i will check for unix style for now. Also, do we want to keep old style virtual hosting by loading nssock globally. I've never used it and it is so inconvenient. The code is in the DriverInit. Or we can convert it as i offered a while ago to be able do host mapping in any loaded nssock driver without need to load nssock globally. > > Also, I see (in driver.c:436) > > drvPtr = firstDrvPtr; > while (drvPtr != NULL) { > if (drvPtr->bindaddr && drvPtr->bindaddr[0] == '/') { > drvPtr->opts |= NS_DRIVER_UNIX; > } > if (drvPtr->opts & NS_DRIVER_UDP) { > > Here the decision is taken on examining the bind-address. > Couldn't we move this way down where the drvPtr->bindaddr > is actually assigned to and turn the drvPtr->opts there? > This would be more logical and easy to understand. > > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2005-06-10 17:05:58
|
Am 10.06.2005 um 18:55 schrieb Stephen Deasey: > > You've just passed arbitrary bytes to an API which expects UTF8. > Expect your server to crash... > > Hm.... set chan [open /the/file.img] fconfigure $chan -translation binary set datain [read $chan] close $file nsv_set Images file.img $datain # set dataout [nsv_set Images file.img] set chan [open /the/fileout.img w] fconfigure $chan -translation binary puts -nonewline $chan $dataout close $file Crash ? Zoran |
From: Vlad S. <vl...@cr...> - 2005-06-10 17:02:22
|
This is i missed, never thought it is available Stephen Deasey wrote: > Tcl_ObjType byteArrayType = Tcl_GetObjType("bytearray"); > > > On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: > >>The problem is, there is no Public API to check object for ByteArray >>type. You have to include tclInt.h for this which is not public. >> >>Stephen Deasey wrote: >> >>>On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: >>> >>> >>>>I thought about ns_return -binary as well. first -binary flag is >>>>optional so it will be compatible with the old API. Let me try this. >>>> >>>>Zoran Vasiljevic wrote: >>>> >>>> >>>>>Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: >>>>> >>>>> >>>>> >>>>>>* Tcl_GetByteArrayFromObj -- >>>>>>* >>>>>>* Attempt to get the array of bytes from the Tcl object. If the >>>>>>* object is not already a ByteArray object, an attempt will be >>>>>>* made to convert it to one. >>>>>> >>>>>>So, if i call ns_return from Tcl and pass data parameter, it will be >>>>>>always type of String. ByteArrays are created from Tcl by binary >>>>>>command only, other commands work with String types, so i need to >>>>>>tell ns_return to treat data as bytearray. Tcl string >>>>>>can contain binary data but it is still String and that check will >>>>>>never work for binary data. >>>>>> >>>>> >>>>>I'm afraid you are right. I also have my own (binary-aware) ns_return >>>>>somewhere >>>>>in my toolbox but never thought it would be of general interest. >>>>> >>>>>OTOH, the "ns_return -binary" would look nicer but I do not >>>>>know if we'd be backwardly-compatible (guess not). >>> >>> >>> >>>The *only* thing a Tcl string can contain is valid UTF8. If you're >>>putting something other than UTF8 in there, you've got big problems... >>> >>>Now, sending a UTF8 string directly to the client as a bytearray is >>>effectively the same as sedinding it in the UTF8 encoding, i.e. the >>>client will recieve exactly what was in memory for that string, >>>because no transcoding to some other character set will be occur. >>>There is API for setting the encoding on a per connection basis. >>> >>>The only way to pass a buffer of arbitrary (non-UTF8) bytes to a >>>command is as a bytearray object. You can create these with the >>>[binary] command, by opening a file with -translation binary, or from >>>some extension such as the image example I gave above. That being the >>>case, you should be able to check the type of the object given to >>>ns_return, and act accordingly >>> >>>It's for these reasons that ns_returnbinary and ns_return -binary are >>>fundamentaly broken. >>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput >>>a projector? How fast can you ride your desk chair down the office luge track? >>>If you want to score the big prize, get to know the little guy. >>>Play to win an NEC 61" plasma display: http://www.necitguy.com/?r >>>_______________________________________________ >>>naviserver-devel mailing list >>>nav...@li... >>>https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> >>-- >>Vlad Seryakov >>571 262-8608 office >>vl...@cr... >>http://www.crystalballinc.com/vlad/ >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput >>a projector? How fast can you ride your desk chair down the office luge track? >>If you want to score the big prize, get to know the little guy. >>Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >>_______________________________________________ >>naviserver-devel mailing list >>nav...@li... >>https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2005-06-10 17:00:41
|
Am 10.06.2005 um 18:27 schrieb Vlad Seryakov: > We can use > Tcl_FSConvertToPathType or Tcl_FsStat > > OK. So Tcl_FSConvertToPathType won't work since it will accept anything that looks like a valid path, even the 192.168.1.1:8000, so this is not the way to go. The Tcl_FSStat is more appealing since it will actualy check the thing being a file. This is much better but will break for people having the file called 192.168.1.1:8000 in the server's home directory :-) I guess, you can't make all happy... Also, I see (in driver.c:436) drvPtr = firstDrvPtr; while (drvPtr != NULL) { if (drvPtr->bindaddr && drvPtr->bindaddr[0] == '/') { drvPtr->opts |= NS_DRIVER_UNIX; } if (drvPtr->opts & NS_DRIVER_UDP) { Here the decision is taken on examining the bind-address. Couldn't we move this way down where the drvPtr->bindaddr is actually assigned to and turn the drvPtr->opts there? This would be more logical and easy to understand. Zoran |
From: Stephen D. <sd...@gm...> - 2005-06-10 16:56:28
|
On 6/10/05, Zoran Vasiljevic <zv...@ar...> wrote: >=20 > Am 10.06.2005 um 18:27 schrieb Vlad Seryakov: >=20 > > We can use > > Tcl_FSConvertToPathType or Tcl_FsStat >=20 > Yes. This could be a solution. I will > look into that later today... Ns_PathIsAbsolute() ? |
From: Stephen D. <sd...@gm...> - 2005-06-10 16:55:29
|
On 6/10/05, Zoran Vasiljevic <zv...@ar...> wrote: >=20 > Am 10.06.2005 um 17:42 schrieb Stephen Deasey: >=20 > > That being the > > case, you should be able to check the type of the object given to > > ns_return, and act accordingly > > >=20 > And what if it shimmers away? >=20 > You read-in the file with "-translation binary" put the resulting data > in the nsv_array, and get it back from there later on? You've just passed arbitrary bytes to an API which expects UTF8.=20 Expect your server to crash... > Now, you'd get a string-type and you need to convert it to binary-array > back. Who will do that? > Normally, if I'd to write the content back, I need to open the file > for writing and set it again to "-translation binary" in order to get > the correct content back. >=20 > I'm not sure if it is enough to rely on the object type. It doesn't make sense to shimmer arbitrary bytes to UTF8 strings. The bytes will be mangled to make the string valid UTF8, but what use it that? |
From: Stephen D. <sd...@gm...> - 2005-06-10 16:51:59
|
Tcl_ObjType byteArrayType =3D Tcl_GetObjType("bytearray"); On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: > The problem is, there is no Public API to check object for ByteArray > type. You have to include tclInt.h for this which is not public. >=20 > Stephen Deasey wrote: > > On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: > > > >>I thought about ns_return -binary as well. first -binary flag is > >>optional so it will be compatible with the old API. Let me try this. > >> > >>Zoran Vasiljevic wrote: > >> > >>>Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: > >>> > >>> > >>>>* Tcl_GetByteArrayFromObj -- > >>>>* > >>>>* Attempt to get the array of bytes from the Tcl object. If the > >>>>* object is not already a ByteArray object, an attempt will be > >>>>* made to convert it to one. > >>>> > >>>>So, if i call ns_return from Tcl and pass data parameter, it will be > >>>>always type of String. ByteArrays are created from Tcl by binary > >>>>command only, other commands work with String types, so i need to > >>>>tell ns_return to treat data as bytearray. Tcl string > >>>>can contain binary data but it is still String and that check will > >>>>never work for binary data. > >>>> > >>> > >>>I'm afraid you are right. I also have my own (binary-aware) ns_return > >>>somewhere > >>>in my toolbox but never thought it would be of general interest. > >>> > >>>OTOH, the "ns_return -binary" would look nicer but I do not > >>>know if we'd be backwardly-compatible (guess not). > > > > > > > > The *only* thing a Tcl string can contain is valid UTF8. If you're > > putting something other than UTF8 in there, you've got big problems... > > > > Now, sending a UTF8 string directly to the client as a bytearray is > > effectively the same as sedinding it in the UTF8 encoding, i.e. the > > client will recieve exactly what was in memory for that string, > > because no transcoding to some other character set will be occur. > > There is API for setting the encoding on a per connection basis. > > > > The only way to pass a buffer of arbitrary (non-UTF8) bytes to a > > command is as a bytearray object. You can create these with the > > [binary] command, by opening a file with -translation binary, or from > > some extension such as the image example I gave above. That being the > > case, you should be able to check the type of the object given to > > ns_return, and act accordingly > > > > It's for these reasons that ns_returnbinary and ns_return -binary are > > fundamentaly broken. > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you s= hotput > > a projector? How fast can you ride your desk chair down the office luge= track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > > _______________________________________________ > > naviserver-devel mailing list > > nav...@li... > > https://lists.sourceforge.net/lists/listinfo/naviserver-devel >=20 > -- > Vlad Seryakov > 571 262-8608 office > vl...@cr... > http://www.crystalballinc.com/vlad/ >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you sho= tput > a projector? How fast can you ride your desk chair down the office luge t= rack? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Stephen D. <sd...@gm...> - 2005-06-10 16:50:10
|
On 6/10/05, Zoran Vasiljevic <zv...@ar...> wrote: >=20 > Am 10.06.2005 um 17:50 schrieb Vlad Seryakov: >=20 > > Second try :-))) >=20 > You'd get (probably) a sigsegv if somebody says: >=20 > ns_return -binary 200 >=20 > Yes, this arg parsing can be a PITA. Therefore I like > Stephens tclobjv code :-) > Unfortunately, it won't do the boolean flags, but we've > discussed that already many times. Yes it will! ns_parseargs doesn't expose this, but it's avaialble to C cod= e. > I'd still strenghten out the parsing with objc checking. >=20 > Zoran >=20 > > > > int > > NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, > > Tcl_Obj *CONST objv[]) > > { > > Ns_Conn *conn; > > unsigned char *data =3D 0, *type =3D 0; > > int result, param =3D 1, status =3D 0, len =3D 0, binary =3D 0; > > > > if (!strcmp(Tcl_GetString(objv[param]),"-binary")) { > > binary =3D 1; > > param++; > > } > > if (Tcl_GetIntFromObj(interp, objv[param++], &status) !=3D TCL_OK) = { > > return TCL_ERROR; > > } > > type =3D Tcl_GetString(objv[param++]); > > if (binary !=3D 0) { > > data =3D Tcl_GetByteArrayFromObj(objv[param], &len); > > } else { > > data =3D Tcl_GetStringFromObj(objv[param], &len); > > } > > if (data =3D=3D NULL || type =3D=3D NULL || status =3D=3D 0) { > > Tcl_WrongNumArgs(interp, 1, objv, "?-binary? status type > > string"); > > return TCL_ERROR; > > } > > if (GetConn(arg, interp, &conn) !=3D TCL_OK) { > > return TCL_ERROR; > > } > > if(binary !=3D 0) { > > result =3D Ns_ConnReturnData(conn, status, data, len, type); > > } else { > > result =3D Ns_ConnReturnCharData(conn, status, data, len, type); > > } > > return Result(interp, result); > > } > > > > > > Zoran Vasiljevic wrote: > > > >> Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: > >> > >>> How about this, i tested it : > >>> > >>> int > >>> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, > >>> Tcl_Obj *CONST objv[]) > >>> > >>> > >> Hm... I would say, if somebody wanted to do: > >> ns_return 200 text/plain -binary > >> you'd have a problem, right? > >> Zoran > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by: NEC IT Guy Games. How far can > >> you shotput > >> a projector? How fast can you ride your desk chair down the office > >> luge track? > >> If you want to score the big prize, get to know the little guy. > >> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > >> _______________________________________________ > >> naviserver-devel mailing list > >> nav...@li... > >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > >> > > > > -- > > Vlad Seryakov > > 571 262-8608 office > > vl...@cr... > > http://www.crystalballinc.com/vlad/ > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > > you shotput > > a projector? How fast can you ride your desk chair down the office > > luge track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > > _______________________________________________ > > naviserver-devel mailing list > > nav...@li... > > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you sho= tput > a projector? How fast can you ride your desk chair down the office luge t= rack? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Stephen D. <sd...@gm...> - 2005-06-10 16:49:28
|
For future reference, you can hande this by using the Ns_ObjvObj option/arg type which just gives you back the underlying Tcl object.=20 You can then handle it however you like. On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: > yes, parsing should check for nulls an dlimits, just to see if idea is > coorrect. obkv parsing will not work here because i will need change on > the fly TclObjvString and TclObjvByteArray. >=20 > if (objc > param && !strcmp(Tcl_GetString(objv[param]),"-binary")) { > binary =3D 1; > param++; > } > if (objc > param && Tcl_GetIntFromObj(interp, objv[param++], > &status) !=3D TCL_OK) { > return TCL_ERROR; > } > if (objc > param) { > type =3D Tcl_GetString(objv[param++]); > } > if (objc > param) { > if (binary !=3D 0) { > data =3D Tcl_GetByteArrayFromObj(objv[param], &len); > } else { > data =3D Tcl_GetStringFromObj(objv[param], &len); > } > } >=20 >=20 > Zoran Vasiljevic wrote: > > > > Am 10.06.2005 um 17:50 schrieb Vlad Seryakov: > > > >> Second try :-))) > > > > > > You'd get (probably) a sigsegv if somebody says: > > > > ns_return -binary 200 > > > > Yes, this arg parsing can be a PITA. Therefore I like > > Stephens tclobjv code :-) > > Unfortunately, it won't do the boolean flags, but we've > > discussed that already many times. > > > > I'd still strenghten out the parsing with objc checking. > > > > Zoran > > > >> > >> int > >> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, > >> Tcl_Obj *CONST objv[]) > >> { > >> Ns_Conn *conn; > >> unsigned char *data =3D 0, *type =3D 0; > >> int result, param =3D 1, status =3D 0, len =3D 0, binary =3D 0; > >> > >> if (!strcmp(Tcl_GetString(objv[param]),"-binary")) { > >> binary =3D 1; > >> param++; > >> } > >> if (Tcl_GetIntFromObj(interp, objv[param++], &status) !=3D TCL_OK)= { > >> return TCL_ERROR; > >> } > >> type =3D Tcl_GetString(objv[param++]); > >> if (binary !=3D 0) { > >> data =3D Tcl_GetByteArrayFromObj(objv[param], &len); > >> } else { > >> data =3D Tcl_GetStringFromObj(objv[param], &len); > >> } > >> if (data =3D=3D NULL || type =3D=3D NULL || status =3D=3D 0) { > >> Tcl_WrongNumArgs(interp, 1, objv, "?-binary? status type > >> string"); > >> return TCL_ERROR; > >> } > >> if (GetConn(arg, interp, &conn) !=3D TCL_OK) { > >> return TCL_ERROR; > >> } > >> if(binary !=3D 0) { > >> result =3D Ns_ConnReturnData(conn, status, data, len, type); > >> } else { > >> result =3D Ns_ConnReturnCharData(conn, status, data, len, type)= ; > >> } > >> return Result(interp, result); > >> } > >> > >> > >> Zoran Vasiljevic wrote: > >> > >>> Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: > >>> > >>>> How about this, i tested it : > >>>> > >>>> int > >>>> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, > >>>> Tcl_Obj *CONST objv[]) > >>>> > >>>> > >>> Hm... I would say, if somebody wanted to do: > >>> ns_return 200 text/plain -binary > >>> you'd have a problem, right? > >>> Zoran > >>> ------------------------------------------------------- > >>> This SF.Net email is sponsored by: NEC IT Guy Games. How far can > >>> you shotput > >>> a projector? How fast can you ride your desk chair down the office > >>> luge track? > >>> If you want to score the big prize, get to know the little guy. > >>> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D2= 0 > >>> _______________________________________________ > >>> naviserver-devel mailing list > >>> nav...@li... > >>> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > >>> > >> > >> -- > >> Vlad Seryakov > >> 571 262-8608 office > >> vl...@cr... > >> http://www.crystalballinc.com/vlad/ > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > >> shotput > >> a projector? How fast can you ride your desk chair down the office > >> luge track? > >> If you want to score the big prize, get to know the little guy. Play > >> to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > >> _______________________________________________ > >> naviserver-devel mailing list > >> nav...@li... > >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > >> > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > > shotput > > a projector? How fast can you ride your desk chair down the office luge > > track? > > If you want to score the big prize, get to know the little guy. Play t= o > > win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > > _______________________________________________ > > naviserver-devel mailing list > > nav...@li... > > https://lists.sourceforge.net/lists/listinfo/naviserver-devel >=20 > -- > Vlad Seryakov > 571 262-8608 office > vl...@cr... > http://www.crystalballinc.com/vlad/ >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you sho= tput > a projector? How fast can you ride your desk chair down the office luge t= rack? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Zoran V. <zv...@ar...> - 2005-06-10 16:34:18
|
Am 10.06.2005 um 18:27 schrieb Vlad Seryakov: > We can use > Tcl_FSConvertToPathType or Tcl_FsStat Yes. This could be a solution. I will look into that later today... Zoran |
From: Vlad S. <vl...@cr...> - 2005-06-10 16:28:20
|
We can use Tcl_FSConvertToPathType or Tcl_FsStat Zoran Vasiljevic wrote: > > Am 10.06.2005 um 17:58 schrieb Vlad Seryakov: > >> We can check for slashes / and \ in the path, not just first >> character. This will work both on Unix and Windows. >> > > > Yes. There should be a call like: > > bool NsLooksLikeUnixPath(char *path) > bool NsLooksLikeWindowsPath(char *path) > > because you need to cover all sorts of weird formats. > > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Vlad S. <vl...@cr...> - 2005-06-10 16:20:01
|
yes, parsing should check for nulls an dlimits, just to see if idea is coorrect. obkv parsing will not work here because i will need change on the fly TclObjvString and TclObjvByteArray. if (objc > param && !strcmp(Tcl_GetString(objv[param]),"-binary")) { binary = 1; param++; } if (objc > param && Tcl_GetIntFromObj(interp, objv[param++], &status) != TCL_OK) { return TCL_ERROR; } if (objc > param) { type = Tcl_GetString(objv[param++]); } if (objc > param) { if (binary != 0) { data = Tcl_GetByteArrayFromObj(objv[param], &len); } else { data = Tcl_GetStringFromObj(objv[param], &len); } } Zoran Vasiljevic wrote: > > Am 10.06.2005 um 17:50 schrieb Vlad Seryakov: > >> Second try :-))) > > > You'd get (probably) a sigsegv if somebody says: > > ns_return -binary 200 > > Yes, this arg parsing can be a PITA. Therefore I like > Stephens tclobjv code :-) > Unfortunately, it won't do the boolean flags, but we've > discussed that already many times. > > I'd still strenghten out the parsing with objc checking. > > Zoran > >> >> int >> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, >> Tcl_Obj *CONST objv[]) >> { >> Ns_Conn *conn; >> unsigned char *data = 0, *type = 0; >> int result, param = 1, status = 0, len = 0, binary = 0; >> >> if (!strcmp(Tcl_GetString(objv[param]),"-binary")) { >> binary = 1; >> param++; >> } >> if (Tcl_GetIntFromObj(interp, objv[param++], &status) != TCL_OK) { >> return TCL_ERROR; >> } >> type = Tcl_GetString(objv[param++]); >> if (binary != 0) { >> data = Tcl_GetByteArrayFromObj(objv[param], &len); >> } else { >> data = Tcl_GetStringFromObj(objv[param], &len); >> } >> if (data == NULL || type == NULL || status == 0) { >> Tcl_WrongNumArgs(interp, 1, objv, "?-binary? status type >> string"); >> return TCL_ERROR; >> } >> if (GetConn(arg, interp, &conn) != TCL_OK) { >> return TCL_ERROR; >> } >> if(binary != 0) { >> result = Ns_ConnReturnData(conn, status, data, len, type); >> } else { >> result = Ns_ConnReturnCharData(conn, status, data, len, type); >> } >> return Result(interp, result); >> } >> >> >> Zoran Vasiljevic wrote: >> >>> Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: >>> >>>> How about this, i tested it : >>>> >>>> int >>>> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, >>>> Tcl_Obj *CONST objv[]) >>>> >>>> >>> Hm... I would say, if somebody wanted to do: >>> ns_return 200 text/plain -binary >>> you'd have a problem, right? >>> Zoran >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: NEC IT Guy Games. How far can >>> you shotput >>> a projector? How fast can you ride your desk chair down the office >>> luge track? >>> If you want to score the big prize, get to know the little guy. >>> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >>> _______________________________________________ >>> naviserver-devel mailing list >>> nav...@li... >>> https://lists.sourceforge.net/lists/listinfo/naviserver-devel >>> >> >> -- >> Vlad Seryakov >> 571 262-8608 office >> vl...@cr... >> http://www.crystalballinc.com/vlad/ >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you >> shotput >> a projector? How fast can you ride your desk chair down the office >> luge track? >> If you want to score the big prize, get to know the little guy. Play >> to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2005-06-10 16:05:31
|
Am 10.06.2005 um 17:58 schrieb Vlad Seryakov: > We can check for slashes / and \ in the path, not just first > character. This will work both on Unix and Windows. > Yes. There should be a call like: bool NsLooksLikeUnixPath(char *path) bool NsLooksLikeWindowsPath(char *path) because you need to cover all sorts of weird formats. Zoran |
From: Zoran V. <zv...@ar...> - 2005-06-10 16:03:23
|
Am 10.06.2005 um 17:50 schrieb Vlad Seryakov: > Second try :-))) You'd get (probably) a sigsegv if somebody says: ns_return -binary 200 Yes, this arg parsing can be a PITA. Therefore I like Stephens tclobjv code :-) Unfortunately, it won't do the boolean flags, but we've discussed that already many times. I'd still strenghten out the parsing with objc checking. Zoran > > int > NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, > Tcl_Obj *CONST objv[]) > { > Ns_Conn *conn; > unsigned char *data = 0, *type = 0; > int result, param = 1, status = 0, len = 0, binary = 0; > > if (!strcmp(Tcl_GetString(objv[param]),"-binary")) { > binary = 1; > param++; > } > if (Tcl_GetIntFromObj(interp, objv[param++], &status) != TCL_OK) { > return TCL_ERROR; > } > type = Tcl_GetString(objv[param++]); > if (binary != 0) { > data = Tcl_GetByteArrayFromObj(objv[param], &len); > } else { > data = Tcl_GetStringFromObj(objv[param], &len); > } > if (data == NULL || type == NULL || status == 0) { > Tcl_WrongNumArgs(interp, 1, objv, "?-binary? status type > string"); > return TCL_ERROR; > } > if (GetConn(arg, interp, &conn) != TCL_OK) { > return TCL_ERROR; > } > if(binary != 0) { > result = Ns_ConnReturnData(conn, status, data, len, type); > } else { > result = Ns_ConnReturnCharData(conn, status, data, len, type); > } > return Result(interp, result); > } > > > Zoran Vasiljevic wrote: > >> Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: >> >>> How about this, i tested it : >>> >>> int >>> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, >>> Tcl_Obj *CONST objv[]) >>> >>> >> Hm... I would say, if somebody wanted to do: >> ns_return 200 text/plain -binary >> you'd have a problem, right? >> Zoran >> ------------------------------------------------------- >> This SF.Net email is sponsored by: NEC IT Guy Games. How far can >> you shotput >> a projector? How fast can you ride your desk chair down the office >> luge track? >> If you want to score the big prize, get to know the little guy. >> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> > > -- > Vlad Seryakov > 571 262-8608 office > vl...@cr... > http://www.crystalballinc.com/vlad/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can > you shotput > a projector? How fast can you ride your desk chair down the office > luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Vlad S. <vl...@cr...> - 2005-06-10 15:59:27
|
We can check for slashes / and \ in the path, not just first character. This will work both on Unix and Windows. Zoran Vasiljevic wrote: > > Am 10.06.2005 um 17:09 schrieb Vlad Seryakov: > >> >> As for Unix sockets, on windows path will be different, on unix >> different but functionality will be there. > > > Yes but the decision on wether the address is for a TCP or unix-domain > socket is based on parsing the address string, right? > > So, on Unix, the unix-domain socket (AF_UNIX) would be > something like: > > /path/to/file > > whereas on Windos it will/might be > > C:\path\to\file > > The parsing will just never discover that the above > is the unix-domain socket and will go to parse the > IP address instead (and fail). This is what I ment. > > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Vlad S. <vl...@cr...> - 2005-06-10 15:57:24
|
The problem is, there is no Public API to check object for ByteArray type. You have to include tclInt.h for this which is not public. Stephen Deasey wrote: > On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: > >>I thought about ns_return -binary as well. first -binary flag is >>optional so it will be compatible with the old API. Let me try this. >> >>Zoran Vasiljevic wrote: >> >>>Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: >>> >>> >>>>* Tcl_GetByteArrayFromObj -- >>>>* >>>>* Attempt to get the array of bytes from the Tcl object. If the >>>>* object is not already a ByteArray object, an attempt will be >>>>* made to convert it to one. >>>> >>>>So, if i call ns_return from Tcl and pass data parameter, it will be >>>>always type of String. ByteArrays are created from Tcl by binary >>>>command only, other commands work with String types, so i need to >>>>tell ns_return to treat data as bytearray. Tcl string >>>>can contain binary data but it is still String and that check will >>>>never work for binary data. >>>> >>> >>>I'm afraid you are right. I also have my own (binary-aware) ns_return >>>somewhere >>>in my toolbox but never thought it would be of general interest. >>> >>>OTOH, the "ns_return -binary" would look nicer but I do not >>>know if we'd be backwardly-compatible (guess not). > > > > The *only* thing a Tcl string can contain is valid UTF8. If you're > putting something other than UTF8 in there, you've got big problems... > > Now, sending a UTF8 string directly to the client as a bytearray is > effectively the same as sedinding it in the UTF8 encoding, i.e. the > client will recieve exactly what was in memory for that string, > because no transcoding to some other character set will be occur. > There is API for setting the encoding on a per connection basis. > > The only way to pass a buffer of arbitrary (non-UTF8) bytes to a > command is as a bytearray object. You can create these with the > [binary] command, by opening a file with -translation binary, or from > some extension such as the image example I gave above. That being the > case, you should be able to check the type of the object given to > ns_return, and act accordingly > > It's for these reasons that ns_returnbinary and ns_return -binary are > fundamentaly broken. > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2005-06-10 15:56:34
|
Am 10.06.2005 um 17:42 schrieb Stephen Deasey: > That being the > case, you should be able to check the type of the object given to > ns_return, and act accordingly > And what if it shimmers away? You read-in the file with "-translation binary" put the resulting data in the nsv_array, and get it back from there later on? Now, you'd get a string-type and you need to convert it to binary-array back. Who will do that? Normally, if I'd to write the content back, I need to open the file for writing and set it again to "-translation binary" in order to get the correct content back. I'm not sure if it is enough to rely on the object type. Zoran |
From: Vlad S. <vl...@cr...> - 2005-06-10 15:51:49
|
Second try :-))) int NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Ns_Conn *conn; unsigned char *data = 0, *type = 0; int result, param = 1, status = 0, len = 0, binary = 0; if (!strcmp(Tcl_GetString(objv[param]),"-binary")) { binary = 1; param++; } if (Tcl_GetIntFromObj(interp, objv[param++], &status) != TCL_OK) { return TCL_ERROR; } type = Tcl_GetString(objv[param++]); if (binary != 0) { data = Tcl_GetByteArrayFromObj(objv[param], &len); } else { data = Tcl_GetStringFromObj(objv[param], &len); } if (data == NULL || type == NULL || status == 0) { Tcl_WrongNumArgs(interp, 1, objv, "?-binary? status type string"); return TCL_ERROR; } if (GetConn(arg, interp, &conn) != TCL_OK) { return TCL_ERROR; } if(binary != 0) { result = Ns_ConnReturnData(conn, status, data, len, type); } else { result = Ns_ConnReturnCharData(conn, status, data, len, type); } return Result(interp, result); } Zoran Vasiljevic wrote: > > Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: > >> How about this, i tested it : >> >> int >> NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, >> Tcl_Obj *CONST objv[]) >> > > Hm... I would say, if somebody wanted to do: > > ns_return 200 text/plain -binary > > you'd have a problem, right? > > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Stephen D. <sd...@gm...> - 2005-06-10 15:42:31
|
On 6/10/05, Vlad Seryakov <vl...@cr...> wrote: > I thought about ns_return -binary as well. first -binary flag is > optional so it will be compatible with the old API. Let me try this. >=20 > Zoran Vasiljevic wrote: > > > > Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: > > > >> * Tcl_GetByteArrayFromObj -- > >> * > >> * Attempt to get the array of bytes from the Tcl object. If the > >> * object is not already a ByteArray object, an attempt will be > >> * made to convert it to one. > >> > >> So, if i call ns_return from Tcl and pass data parameter, it will be > >> always type of String. ByteArrays are created from Tcl by binary > >> command only, other commands work with String types, so i need to > >> tell ns_return to treat data as bytearray. Tcl string > >> can contain binary data but it is still String and that check will > >> never work for binary data. > >> > > > > I'm afraid you are right. I also have my own (binary-aware) ns_return > > somewhere > > in my toolbox but never thought it would be of general interest. > > > > OTOH, the "ns_return -binary" would look nicer but I do not > > know if we'd be backwardly-compatible (guess not). The *only* thing a Tcl string can contain is valid UTF8. If you're putting something other than UTF8 in there, you've got big problems... Now, sending a UTF8 string directly to the client as a bytearray is effectively the same as sedinding it in the UTF8 encoding, i.e. the client will recieve exactly what was in memory for that string, because no transcoding to some other character set will be occur.=20 There is API for setting the encoding on a per connection basis. The only way to pass a buffer of arbitrary (non-UTF8) bytes to a command is as a bytearray object. You can create these with the [binary] command, by opening a file with -translation binary, or from some extension such as the image example I gave above. That being the case, you should be able to check the type of the object given to ns_return, and act accordingly It's for these reasons that ns_returnbinary and ns_return -binary are fundamentaly broken. |
From: Zoran V. <zv...@ar...> - 2005-06-10 15:40:29
|
Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: > How about this, i tested it : > > int > NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, > Tcl_Obj *CONST objv[]) > Hm... I would say, if somebody wanted to do: ns_return 200 text/plain -binary you'd have a problem, right? Zoran |
From: Zoran V. <zv...@ar...> - 2005-06-10 15:24:27
|
Am 10.06.2005 um 17:09 schrieb Vlad Seryakov: > > As for Unix sockets, on windows path will be different, on unix > different but functionality will be there. Yes but the decision on wether the address is for a TCP or unix-domain socket is based on parsing the address string, right? So, on Unix, the unix-domain socket (AF_UNIX) would be something like: /path/to/file whereas on Windos it will/might be C:\path\to\file The parsing will just never discover that the above is the unix-domain socket and will go to parse the IP address instead (and fail). This is what I ment. Zoran |
From: Vlad S. <vl...@cr...> - 2005-06-10 15:24:06
|
How about this, i tested it : int NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Ns_Conn *conn; unsigned char *data = 0, *type = 0; int i, result, status = 0, len = 0, binary = 0; for (i = 1;i < objc;i++) { if (!strcmp(Tcl_GetString(objv[i]),"-binary")) { binary = 1; } else if (status == 0) { if (Tcl_GetIntFromObj(interp, objv[i], &status) != TCL_OK) { return TCL_ERROR; } } else if (type == NULL) { type = Tcl_GetString(objv[i]); } else if (data == NULL) { if (binary != 0) { data = Tcl_GetByteArrayFromObj(objv[i], &len); } else { data = Tcl_GetStringFromObj(objv[i], &len); } } } if (data == NULL || type == NULL || status == 0) { Tcl_WrongNumArgs(interp, 1, objv, "?-binary? status type string"); return TCL_ERROR; } if (GetConn(arg, interp, &conn) != TCL_OK) { return TCL_ERROR; } if(binary != 0) { result = Ns_ConnReturnData(conn, status, data, len, type); } else { result = Ns_ConnReturnCharData(conn, status, data, len, type); } return Result(interp, result); } Vlad Seryakov wrote: > I thought about ns_return -binary as well. first -binary flag is > optional so it will be compatible with the old API. Let me try this. > > Zoran Vasiljevic wrote: > >> >> Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: >> >>> * Tcl_GetByteArrayFromObj -- >>> * >>> * Attempt to get the array of bytes from the Tcl object. If the >>> * object is not already a ByteArray object, an attempt will be >>> * made to convert it to one. >>> >>> So, if i call ns_return from Tcl and pass data parameter, it will be >>> always type of String. ByteArrays are created from Tcl by binary >>> command only, other commands work with String types, so i need to >>> tell ns_return to treat data as bytearray. Tcl string >>> can contain binary data but it is still String and that check will >>> never work for binary data. >>> >> >> I'm afraid you are right. I also have my own (binary-aware) ns_return >> somewhere >> in my toolbox but never thought it would be of general interest. >> >> OTOH, the "ns_return -binary" would look nicer but I do not >> know if we'd be backwardly-compatible (guess not). >> >> Zoran >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you >> shotput >> a projector? How fast can you ride your desk chair down the office >> luge track? >> If you want to score the big prize, get to know the little guy. Play >> to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Vlad S. <vl...@cr...> - 2005-06-10 15:09:47
|
It works i tested udp and icmp As for Unix sockets, on windows path will be different, on unix different but functionality will be there. Zoran Vasiljevic wrote: > > Am 10.06.2005 um 15:46 schrieb Vlad Seryakov: > >> Looks like you already know what to do, so go ahead and cleanup that >> stuff. >> > > Vlad, > > Can you do me a favour and try the my new checkin of binder.c? > I think I got it all right, but you never know until you > test it. The usual TCP stuff works. I have not tried the > rest (it should work though). > > Cheers > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Vlad S. <vl...@cr...> - 2005-06-10 15:07:49
|
I thought about ns_return -binary as well. first -binary flag is optional so it will be compatible with the old API. Let me try this. Zoran Vasiljevic wrote: > > Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: > >> * Tcl_GetByteArrayFromObj -- >> * >> * Attempt to get the array of bytes from the Tcl object. If the >> * object is not already a ByteArray object, an attempt will be >> * made to convert it to one. >> >> So, if i call ns_return from Tcl and pass data parameter, it will be >> always type of String. ByteArrays are created from Tcl by binary >> command only, other commands work with String types, so i need to >> tell ns_return to treat data as bytearray. Tcl string >> can contain binary data but it is still String and that check will >> never work for binary data. >> > > I'm afraid you are right. I also have my own (binary-aware) ns_return > somewhere > in my toolbox but never thought it would be of general interest. > > OTOH, the "ns_return -binary" would look nicer but I do not > know if we'd be backwardly-compatible (guess not). > > Zoran > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. Play to > win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |