http/request: only access .version property once
daurnimator
5 years ago
356 | 356 | local host = self.host |
357 | 357 | local port = self.port |
358 | 358 | local tls = self.tls |
359 | local version = self.version | |
359 | 360 | |
360 | 361 | -- RFC 6797 Section 8.3 |
361 | 362 | if not tls and self.hsts and self.hsts:check(host) then |
443 | 444 | tls = tls; |
444 | 445 | ctx = self.ctx; |
445 | 446 | sendname = self.sendname; |
446 | version = self.version; | |
447 | version = version; | |
447 | 448 | h2_settings = default_h2_settings; |
448 | 449 | }, deadline and deadline-monotime()) |
449 | 450 | if connection == nil then |
479 | 480 | tls = tls; |
480 | 481 | ctx = self.ctx; |
481 | 482 | sendname = self.sendname ~= nil and self.sendname or host; |
482 | version = self.version; | |
483 | version = version; | |
483 | 484 | h2_settings = default_h2_settings; |
484 | 485 | }, deadline and deadline-monotime()) |
485 | 486 | if connection == nil then |
500 | 501 | tls = tls; |
501 | 502 | ctx = self.ctx; |
502 | 503 | sendname = self.sendname; |
503 | version = self.version; | |
504 | version = version; | |
504 | 505 | h2_settings = default_h2_settings; |
505 | 506 | }, deadline and deadline-monotime()) |
506 | 507 | if connection == nil then |