Programming/web 관련2019. 4. 26. 16:41

node.js 에서 내용을 못 까길래 이상하다 싶어서 보는데 나온 용어.

혹시  node.js 에서 TLSv1.3을 지원하지 않기 때문인가.. 정책상 못풀게 되어 있어서 못 건드는걸까?

Perfect Forward Secrecy was optional up to TLSv1.2, but it is not optional for TLSv1.3, because all TLSv1.3 cipher suites use ECDHE.

TLSv1.3 does not support renegotiation.

[링크 : https://nodejs.org/api/tls.html]

[링크 : https://medium.com/sjk5766/ecdhe-왜-패킷을-보여주지-않는거야-6abc43d5ac9e]

[링크 : https://rsec.kr/?p=455]

'Programming > web 관련' 카테고리의 다른 글

resizable table cell  (0) 2019.06.17
web framework  (0) 2019.06.05
css position  (0) 2019.03.28
webpack  (0) 2019.02.20
ajax bearer token header  (0) 2019.02.07
Posted by 구차니

프록시 만들어 보다보니

그냥 사용중에는 티가 안나는데 저장된 파일은 단순하게 http meta equiv도 없이 리다이렉션 되서 찾아봄

 

 

[링크 : https://www.netmanias.com/.../cdn-http-network-protocol/http-redirection-using-302-found]

[링크 : https://developer.mozilla.org/ko/docs/Web/HTTP/Status/302]

'Programming > javascript & HTML' 카테고리의 다른 글

웹에서 f5 갱신 막기  (0) 2019.06.04
cose network graph  (0) 2019.06.03
closure  (0) 2019.04.24
iife (Immediately Invoked Function Expression)  (0) 2019.04.23
javascript 배열 초기화(벤치마크)  (0) 2019.04.12
Posted by 구차니

클로저 듣긴했는데 머더라?

 

 

[링크 : https://hyunseob.github.io/2016/08/30/javascript-closure/]

'Programming > javascript & HTML' 카테고리의 다른 글

cose network graph  (0) 2019.06.03
HTTP 302 redirect  (0) 2019.04.26
iife (Immediately Invoked Function Expression)  (0) 2019.04.23
javascript 배열 초기화(벤치마크)  (0) 2019.04.12
js 난독화  (0) 2019.03.14
Posted by 구차니

요게.. 람다랑 같은건지 다른건지 모르겠네?

 

[링크 : https://velog.io/@doondoony/javascript-iife]

[링크 : http://chanlee.github.io/2014/01/11/understand-javascript-iife/]

[링크 : http://jdub7138.blog.me/221027225353]

'Programming > javascript & HTML' 카테고리의 다른 글

HTTP 302 redirect  (0) 2019.04.26
closure  (0) 2019.04.24
javascript 배열 초기화(벤치마크)  (0) 2019.04.12
js 난독화  (0) 2019.03.14
HTML video 태그 loop 와 webalizer hit  (0) 2019.02.28
Posted by 구차니
Programming/node.js2019. 4. 23. 18:17

와.. 'undefined' 랑 비교 안해도 되는 저런 멋진 문법?

if('content-length' in ctx.proxyToServerRequestOptions.headers)

[링크 : https://github.com/.../examples/removeProxyToServerContentLength.js]

[링크 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in]

'Programming > node.js' 카테고리의 다른 글

pdf 내용 추출  (0) 2019.05.27
node.js express 301 redirect  (0) 2019.05.15
proxy error: Error: write after end  (0) 2019.04.23
node.js 시그널 핸들링과 reload  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
Posted by 구차니
Programming/node.js2019. 4. 23. 18:07

흐음.. 왜 안써지냐..

기본 예제로는 response.end(data) 식이었고..

얘는 response.write(data, endcoding); response.end(callback); 두개 문장으로 실행되는 유사한 효과를 준다는데

그럼 되는거 아닌가? ㅠㅠ

 

response.end([data][, encoding][, callback])#

History

This method signals to the server that all of the response headers and body have been sent; that server should consider this message complete. The method, response.end(), MUST be called on each response.

If data is specified, it is similar in effect to calling response.write(data, encoding) followed by response.end(callback).

If callback is specified, it will be called when the response stream is finished.

[링크 : https://nodejs.org/api/http.html#http_class_http_serverresponse]

 

 

+

으으 망할.. async 문제인가?

[링크 : https://teamtreehouse.com/community/error-write-after-end-3]

'Programming > node.js' 카테고리의 다른 글

node.js express 301 redirect  (0) 2019.05.15
node.js 항목 확인  (0) 2019.04.23
node.js 시그널 핸들링과 reload  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
url 끝의 /  (0) 2019.04.17
Posted by 구차니
Programming/node.js2019. 4. 23. 13:31

process.on 으로 시그널 핸들러를 연결해두는 듯

 

var cluster = require('cluster');

console.log('started master with ' + process.pid);

//fork the first process
cluster.fork();

process.on('SIGHUP', function () {
  console.log('Reloading...');
  var new_worker = cluster.fork();
  new_worker.once('listening', function () {
    //stop all other workers
    for(var id in cluster.workers) {
      if (id === new_worker.id.toString()) continue;
      cluster.workers[id].kill('SIGTERM');
    }
  });
});

[링크 : https://joseoncode.com/2015/01/18/reloading-node-with-no-downtime/]

[링크 : http://zguide.zeromq.org/js:interrupt]

[링크 : https://stackoverflow.com/questions/20165605/detecting-ctrlc-in-node-js]

'Programming > node.js' 카테고리의 다른 글

node.js 항목 확인  (0) 2019.04.23
proxy error: Error: write after end  (0) 2019.04.23
nodejs url param delete  (0) 2019.04.17
url 끝의 /  (0) 2019.04.17
js array key 삭제하기  (0) 2019.04.16
Posted by 구차니
Programming/Java(Spring)2019. 4. 23. 10:19

maven 에서 repackging 이라는걸로 인해서 이렇게 바뀐다는데

file로 보면 war는 data과 war.original은 zip archive data 라고 되어있는데 무슨 차이인지 감이 안오네..

 

The answer is that you are using repackage goal in your spring-boot-maven-plugin. So, What it does?

Maven first builds your project and packages your classes and resources into a WAR (${artifactId}.war) file.

Then, repackaging happens. In this goal, all the dependencies mentioned in the pom.xml are packaged inside a new WAR (${artifactId}.war) and the previously generated war is renamed to ${artifactId}.war.original.

[링크 : https://stackoverflow.com/.../why-spring-boot-generate-jar-or-war-file-with-original-extention/43641913]

[링크 : https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html]

 

[링크 : http://repackage.org/]

 

Repackages existing JAR and WAR archives so that they can be executed from the command line using java -jar. With layout=NONE can also be used simply to package a JAR with nested dependencies (and no main class, so not executable).

[링크 : https://docs.spring.io/spring-boot/docs/current/maven-plugin/repackage-mojo.html]

 

[링크 : https://preamtree.tistory.com/69]

Posted by 구차니
Programming/Java(Spring)2019. 4. 18. 10:30

jcmd

[링크 : https://docs.oracle.com/javase/10/tools/jcmd.htm]

 

# jcmd --help
Error parsing arguments: No command specified

Usage: jcmd  PerfCounter.print|-f file>
   or: jcmd -l
   or: jcmd -h

  command must be a valid jcmd command for the selected jvm.
  Use the command "help" to see which commands are available.
  If the pid is 0, commands will be sent to all Java processes.
  The main class argument will be used to match (either partially
  or fully) the class used to start Java.
  If no options are given, lists Java processes (same as -p).

  PerfCounter.print display the counters exposed by this process
  -f  read and execute commands from the file
  -l  list JVM processes on the local machine
  -h  this help

 

근데 보는법을 모르겠다 ㅠㅠ

# jcmd 10776 help
10776:
The following commands are available:
JFR.stop
JFR.start
JFR.dump
JFR.check
VM.native_memory
VM.check_commercial_features
VM.unlock_commercial_features
ManagementAgent.stop
ManagementAgent.start_local
ManagementAgent.start
VM.classloader_stats
GC.rotate_log
Thread.print
GC.class_stats
GC.class_histogram
GC.heap_dump
GC.finalizer_info
GC.heap_info
GC.run_finalization
GC.run
VM.uptime
VM.dynlibs
VM.flags
VM.system_properties
VM.command_line
VM.version
help

For more information about a specific command use 'help 

'.

# jcmd 10776 GC.heap_info
10776:
 PSYoungGen      total 192512K, used 187956K [0x00000000ec400000, 0x00000000f8300000, 0x0000000100000000)
  eden space 189952K, 98% used [0x00000000ec400000,0x00000000f7a0d258,0x00000000f7d80000)
  from space 2560K, 60% used [0x00000000f7d80000,0x00000000f7f00000,0x00000000f8000000)
  to   space 2560K, 0% used [0x00000000f8080000,0x00000000f8080000,0x00000000f8300000)
 ParOldGen       total 647168K, used 591782K [0x00000000c4c00000, 0x00000000ec400000, 0x00000000ec400000)
  object space 647168K, 91% used [0x00000000c4c00000,0x00000000e8de99b8,0x00000000ec400000)
 Metaspace       used 107438K, capacity 109826K, committed 110336K, reserved 1146880K
  class space    used 13031K, capacity 13457K, committed 13568K, reserved 1048576K

[링크 : http://karunsubramanian.com/websphere/how-to-monior-heap-usage-of-a-java-application/]

 

+

GPL 이라는데 상용으로 사용가능한지 모르겠음

[링크 : https://visualvm.github.io/]

 

 

+

클래스 히스토그램은.. 클래스별 메모리 사용량인가?

# jcmd 10776 GC.class_histogram
10776:

 num     #instances         #bytes  class name
----------------------------------------------
   1:        150865      436535528  [C
   2:          7008       47125920  [B
   3:        134955        4318560  java.util.concurrent.ConcurrentHashMap$Node
   4:        145517        3492408  java.lang.String
   5:         11226        3398488  [I

 

찾다보니 jmap -histo pid도 동일한 결과를 내주네..

[링크 : http://www.openkb.info/2014/06/how-to-check-java-memory-usage.html]

 

일단 의미를 보건대.. [C는 Char array 라는 느낌인데

무슨 미친 char 배열 객체가 이렇게 메모리를 쳐드시나...

Element Type        Encoding
boolean             Z
byte                B
char                C
class or interface  Lclassname;
double              D
float               F
int                 I
long                J
short               S 

 

it is an array of objects as specified by JVM Specifications for internal representation of class names:

  • a single [ means an array of
  • L followed by a fully qualified class name (e.g. java/lang/Object) is the class name terminated by semicolon ;

so [Ljava.lang.object; means Object[]

[링크 : https://stackoverflow.com/.../what-do-those-strange-class-names-in-a-java-heap-dump-mean]

 

+

[링크 : https://spring.io/blog/2015/12/10/spring-boot-memory-performance]

Posted by 구차니
Programming/node.js2019. 4. 17. 22:06

url 파라미트에서 특정 녀석을 삭제할 수 있는 기능

 

urlSearchParams.delete(name)#

Remove all name-value pairs whose name is name.

[링크 : https://nodejs.org/api/url.html#url_urlsearchparams_delete_name]

Posted by 구차니